global table content
This commit is contained in:
@@ -113,6 +113,20 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn global_tables_have_their_own_scope() {
|
||||
let mut state = page();
|
||||
state.selection.profile = "__global".to_string();
|
||||
|
||||
let html = render_workspace(&state);
|
||||
|
||||
assert!(html.contains(r#"value="__global" selected"#));
|
||||
assert!(html.contains("Global — all profiles"));
|
||||
assert!(html.contains("/admin/tables/new?global=true"));
|
||||
assert!(!html.contains("Copy <code>__global</code>"));
|
||||
assert!(!html.contains("Create tables from an invoice template"));
|
||||
}
|
||||
|
||||
fn page() -> TableDefinitionPageState {
|
||||
TableDefinitionPageState {
|
||||
nav: Nav::default(),
|
||||
@@ -254,7 +268,7 @@ mod tests {
|
||||
state.tables.clear();
|
||||
let html = render_workspace(&state);
|
||||
assert!(!html.contains("/admin/table-definition/copy"));
|
||||
assert!(html.contains("Choose a profile"));
|
||||
assert!(html.contains("Choose a scope"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user