1
//! The transaction list links its rows to the edit page over the shared forms
2
//! (plan 0016 W6), never to the legacy edit page.
3

            
4
use axum::http::StatusCode;
5

            
6
use crate::common::edit_page::{fx_transaction, ledger};
7
use crate::common::list_page::list;
8

            
9
#[supp_macro::shared_runtime_test]
10
1
async fn list_rows_link_to_the_shared_edit_page() {
11
1
    let ledger = ledger().await;
12
1
    let id = fx_transaction(&ledger, "linked").await;
13
1
    let reply = list(&ledger.user, "").await;
14

            
15
1
    assert_eq!(reply.status, StatusCode::OK, "{}", reply.body);
16
1
    assert!(
17
1
        reply
18
1
            .body
19
1
            .contains(&format!("href=\"/transaction/{id}/edit\"")),
20
        "{}",
21
        reply.body
22
    );
23
1
    assert!(!reply.body.contains("/transaction/edit/"), "{}", reply.body);
24
}