Here, if date is changed between first line and client.post, this test fails.
|
let today_str = Local::today().naive_local().to_string(); |
|
// First, ensure current task date is not today. |
|
assert_ne!(new_tasks[0].updated_at, today_str); |
|
|
|
let inserted_id = new_tasks[0].id.unwrap(); // `id` is `Nullable` |
|
let res = client.post(format!("/{}/date", inserted_id)).dispatch(); |
|
let mut cookies = res.headers().get("Set-Cookie"); |
|
let final_tasks = Task::all(&conn); |
|
assert_eq!(res.status(), Status::SeeOther); |
|
assert!(cookies.any(|value| value.contains("success"))); |
|
assert_eq!(final_tasks[0].updated_at, today_str); |
Apparently this is not critical issue, but, for example, GitHub Action could add ❌ to originally ✅ commit.
Here, if date is changed between first line and
client.post, this test fails.last-date/src/tests.rs
Lines 258 to 268 in c25efc5
Apparently this is not critical issue, but, for example, GitHub Action could add ❌ to originally ✅ commit.