From c8e5e3986583d886f1eb333fff48b4d35de488ac Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 4 Aug 2024 08:54:32 +0200 Subject: [PATCH] Hide the "Details" link of commit status when the user cannot access actions (testifylint) --- models/git/commit_status_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/git/commit_status_test.go b/models/git/commit_status_test.go index bff3d3dccf..1014ee1e13 100644 --- a/models/git/commit_status_test.go +++ b/models/git/commit_status_test.go @@ -244,11 +244,11 @@ func TestFindRepoRecentCommitStatusContexts(t *testing.T) { } func TestCommitStatusesHideActionsURL(t *testing.T) { - assert.NoError(t, unittest.PrepareTestDatabase()) + require.NoError(t, unittest.PrepareTestDatabase()) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) run := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{ID: 791, RepoID: repo.ID}) - assert.NoError(t, run.LoadAttributes(db.DefaultContext)) + require.NoError(t, run.LoadAttributes(db.DefaultContext)) statuses := []*git_model.CommitStatus{ {