_id is free
This commit is contained in:
@@ -63,7 +63,7 @@ pub(crate) fn render_submission_error(message: &str) -> String {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{
|
||||
pages::add_table::draft::{LinkMode, TableDraft},
|
||||
pages::add_table::draft::TableDraft,
|
||||
schema::{ColumnDefinition, MoneyMode},
|
||||
};
|
||||
|
||||
@@ -81,7 +81,6 @@ mod tests {
|
||||
currency: String::new(),
|
||||
});
|
||||
draft.set_available_relation_tables(vec!["customer".to_string()]);
|
||||
draft.cycle_link_mode(0);
|
||||
draft.toggle_row_display_candidate(1);
|
||||
|
||||
AddTablePageState {
|
||||
@@ -103,11 +102,9 @@ mod tests {
|
||||
// Every part of the draft travels with the next request.
|
||||
assert!(html.contains(r#"name="column_names" value="number""#));
|
||||
assert!(html.contains(r#"name="column_indexed" value="yes""#));
|
||||
assert!(html.contains(r#"name="link_tables" value="customer""#));
|
||||
assert!(html.contains(r#"name="link_modes" value="optional""#));
|
||||
assert!(html.contains(r#"name="relation_tables" value="customer""#));
|
||||
assert!(html.contains(r#"name="row_display_columns" value="number""#));
|
||||
// The preview shows the schema as it will exist.
|
||||
assert!(html.contains("customer_id"));
|
||||
assert!(html.contains("BIGSERIAL"));
|
||||
assert!(html.contains("TIMESTAMPTZ"));
|
||||
}
|
||||
@@ -208,12 +205,4 @@ mod tests {
|
||||
assert!(html.contains("The backend is unreachable."));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_link_mode_is_shown_on_the_button_that_cycles_it() {
|
||||
let html = render_builder(&page());
|
||||
|
||||
assert!(html.contains(r#""action": "cycle-link", "index": "0""#));
|
||||
assert!(html.contains("mode-optional"));
|
||||
assert_eq!(LinkMode::Optional.label(), "optional");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user