diff options
Diffstat (limited to 'internal/api/server_test.go')
| -rw-r--r-- | internal/api/server_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/api/server_test.go b/internal/api/server_test.go index 9b5c7ae..afdc9d2 100644 --- a/internal/api/server_test.go +++ b/internal/api/server_test.go @@ -397,9 +397,8 @@ func TestRunTask_CompletedTask_Returns409(t *testing.T) { } var body map[string]string json.NewDecoder(w.Body).Decode(&body) - wantMsg := "task cannot be queued from state COMPLETED" - if body["error"] != wantMsg { - t.Errorf("error body: want %q, got %q", wantMsg, body["error"]) + if !strings.Contains(body["error"], "invalid state transition") { + t.Errorf("error body: want it to contain 'invalid state transition', got %q", body["error"]) } } |
