Fixed Form Vlidation
This commit is contained in:
@@ -94,8 +94,10 @@ class TestFormApproval:
|
||||
state = _by_table(await client.get(f"{API}/approvals", headers=auth["mr1"]))["fare_chart"]
|
||||
assert state["status"] == "draft" and state["approved_by_name"] is None
|
||||
# A pending (not yet approved) form is withdrawn too, so the AM never signs stale data.
|
||||
# Deleting a row is admin-only — an MR can no longer delete their own rows.
|
||||
await client.post(f"{API}/fare_chart/approval/request", headers=auth["mr1"])
|
||||
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["mr1"])).status_code == 204
|
||||
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["mr1"])).status_code == 403
|
||||
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["admin"])).status_code == 204
|
||||
assert (await client.get(f"{API}/approvals", headers=auth["am1"])).json() == [] # withdrawn: nothing left for the AM
|
||||
|
||||
async def test_the_pdf_signature_comes_from_the_server_not_the_browser(self, client, auth, org, db, fare_chart):
|
||||
|
||||
Reference in New Issue
Block a user