From f1ccc98dfbbca9033e723e379d1c8c5772990f09 Mon Sep 17 00:00:00 2001 From: Finn Arne Gangstad Date: Mon, 16 Oct 2023 11:54:39 +0200 Subject: [PATCH] refactor: regen mocks, use existing VerifyWasCalled(Never()) --- server/events/command_runner_test.go | 2 +- server/events/vcs/mocks/mock_client.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/server/events/command_runner_test.go b/server/events/command_runner_test.go index ea25dc91d4..b99c6b1933 100644 --- a/server/events/command_runner_test.go +++ b/server/events/command_runner_test.go @@ -729,7 +729,7 @@ func TestRunUnlockCommandDoesntRetrieveLabelsIfDisableUnlockLabelNotSet(t *testi ch.RunCommentCommand(testdata.GithubRepo, &testdata.GithubRepo, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Unlock}) - vcsClient.VerifyWasNotCalled().GetPullLabels(testdata.GithubRepo, modelPull) + vcsClient.VerifyWasCalled(Never()).GetPullLabels(testdata.GithubRepo, modelPull) } func TestRunAutoplanCommand_DeletePlans(t *testing.T) { diff --git a/server/events/vcs/mocks/mock_client.go b/server/events/vcs/mocks/mock_client.go index 4150e5ffeb..7583e22fac 100644 --- a/server/events/vcs/mocks/mock_client.go +++ b/server/events/vcs/mocks/mock_client.go @@ -286,13 +286,6 @@ func (mock *MockClient) UpdateStatus(repo models.Repo, pull models.PullRequest, return ret0 } -func (mock *MockClient) VerifyWasNotCalled() *VerifierMockClient { - return &VerifierMockClient{ - mock: mock, - invocationCountMatcher: pegomock.Times(0), - } -} - func (mock *MockClient) VerifyWasCalledOnce() *VerifierMockClient { return &VerifierMockClient{ mock: mock,