exchange broker options
This commit is contained in:
@@ -111,6 +111,7 @@ mod tests {
|
||||
nav: Nav::default(),
|
||||
shared_profile: "__global".to_string(),
|
||||
profiles: vec!["billing".to_string()],
|
||||
rate_sources: vec!["ecb".to_string()],
|
||||
draft,
|
||||
status: None,
|
||||
error: None,
|
||||
@@ -221,13 +222,15 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_page_offers_the_new_profile_option_and_the_currency_list() {
|
||||
fn the_page_offers_backend_vocabularies_for_profile_setup() {
|
||||
let html = render_page(&page());
|
||||
|
||||
assert!(!html.contains("Template error"), "{html}");
|
||||
assert!(html.contains(r#"value="__new__""#));
|
||||
assert!(html.contains(r#"<datalist id="currency-codes">"#));
|
||||
assert!(html.contains(r#"<option value="EUR">"#));
|
||||
assert!(html.contains(r#"<datalist id="rate-source-ids">"#));
|
||||
assert!(html.contains(r#"<option value="ecb">"#));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -373,7 +376,16 @@ mod tests {
|
||||
state.draft.creating_new_profile = true;
|
||||
let html = render_builder(&state);
|
||||
assert!(html.contains(r#"name="profile_name_input""#));
|
||||
assert!(html.contains(r#"name="accounting_currency" value="EUR" list="currency-codes""#));
|
||||
assert!(html.contains(r#"name="accounting_currency""#));
|
||||
assert!(html.contains(r#"list="currency-codes""#));
|
||||
assert!(html.contains(r#"name="rate_source_id""#));
|
||||
assert!(html.contains(r#"list="rate-source-ids""#));
|
||||
let foreign_currency_input = html
|
||||
.split(r#"name="foreign_currencies""#)
|
||||
.nth(1)
|
||||
.and_then(|rest| rest.split('>').next())
|
||||
.expect("the initial foreign-currency input should be rendered");
|
||||
assert!(foreign_currency_input.contains(r#"list="currency-codes""#));
|
||||
}
|
||||
|
||||
/// The dialog only exists when there is a failure, and it carries the same
|
||||
|
||||
Reference in New Issue
Block a user