Lines
100 %
Functions
Branches
//! The transaction list links its rows to the edit page over the shared forms
//! (plan 0016 W6), never to the legacy edit page.
use axum::http::StatusCode;
use crate::common::edit_page::{fx_transaction, ledger};
use crate::common::list_page::list;
#[supp_macro::shared_runtime_test]
async fn list_rows_link_to_the_shared_edit_page() {
let ledger = ledger().await;
let id = fx_transaction(&ledger, "linked").await;
let reply = list(&ledger.user, "").await;
assert_eq!(reply.status, StatusCode::OK, "{}", reply.body);
assert!(
reply
.body
.contains(&format!("href=\"/transaction/{id}/edit\"")),
"{}",
reply.body
);
assert!(!reply.body.contains("/transaction/edit/"), "{}", reply.body);
}