From 7ec2008e3458e91f156c29717e3eaa04d6a6daf0 Mon Sep 17 00:00:00 2001 From: Sebastiaan de Schaetzen Date: Sun, 18 May 2025 08:32:33 +0200 Subject: [PATCH] Add invalid id test --- backend/api_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/api_test.go b/backend/api_test.go index a5eaf29..67918f9 100644 --- a/backend/api_test.go +++ b/backend/api_test.go @@ -594,6 +594,11 @@ func TestCompleteTask(t *testing.T) { } } +func TestCompleteTaskInvalidId(t *testing.T) { + e := startServer(t) + e.POST("/task/999/complete").Expect().Status(404) +} + func TestCompleteTaskAllowanceWeightsSumTo0(t *testing.T) { e := startServer(t) taskId := createTestTaskWithAmount(e, 101) @@ -626,11 +631,6 @@ func TestCompleteTaskAllowanceWeightsSumTo0(t *testing.T) { allowances.Value(1).Object().Value("progress").Number().IsEqual(0) } -func TestCompleteTaskInvalidId(t *testing.T) { - e := startServer(t) - e.POST("/task/999/complete").Expect().Status(404) -} - func TestCompleteAllowance(t *testing.T) { e := startServer(t) createTestTaskWithAmount(e, 100)