diff --git a/pkg/webtests/background_test.go b/pkg/webtests/background_test.go index 60c2f7c0c..75a411eb3 100644 --- a/pkg/webtests/background_test.go +++ b/pkg/webtests/background_test.go @@ -23,6 +23,7 @@ import ( bgHandler "code.vikunja.io/api/pkg/modules/background/handler" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestProjectBackgroundDeletePermission(t *testing.T) { @@ -41,7 +42,7 @@ func TestProjectBackgroundDeletePermission(t *testing.T) { ) // Should be forbidden for a read-only user - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, http.StatusForbidden, getHTTPErrorCode(err)) }) } diff --git a/pkg/webtests/task_comment_test.go b/pkg/webtests/task_comment_test.go index b9e5cba1d..bffecf2df 100644 --- a/pkg/webtests/task_comment_test.go +++ b/pkg/webtests/task_comment_test.go @@ -330,7 +330,7 @@ func TestTaskCommentIDOR(t *testing.T) { "task": "1", // task accessible to testuser1 "commentid": "18", // comment belonging to task 34, NOT accessible to testuser1 }) - assert.Error(t, err) + require.Error(t, err) assertHandlerErrorCode(t, err, models.ErrCodeTaskCommentDoesNotExist) }) }