From a25654758c2be47f827ad3433e16652ea1cc5ba2 Mon Sep 17 00:00:00 2001 From: Tom O'Dwyer Date: Wed, 8 May 2024 15:20:53 +0100 Subject: [PATCH] Add test for empty workspace requests --- tests/integration/views/test_request.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/views/test_request.py b/tests/integration/views/test_request.py index d5213967..1baa20c2 100644 --- a/tests/integration/views/test_request.py +++ b/tests/integration/views/test_request.py @@ -538,6 +538,16 @@ def test_request_withdraw_not_author(airlock_client): assert persisted_request.status == RequestStatus.PENDING +def test_empty_requests_for_workspace(airlock_client): + airlock_client.login(workspaces=["test1"]) + + response = airlock_client.get("/requests/workspace/test1") + + response.render() + assert response.status_code == 200 + assert "There are no requests in this workspace" in response.rendered_content + + def test_requests_for_workspace(airlock_client): airlock_client.login(workspaces=["test1"]) author1 = factories.create_user("author1", ["test1"], False)