diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/services/git/branch_hooks_service_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/services/git/branch_hooks_service_spec.rb')
-rw-r--r-- | spec/services/git/branch_hooks_service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/git/branch_hooks_service_spec.rb b/spec/services/git/branch_hooks_service_spec.rb index ae0506ad442..908b9772c40 100644 --- a/spec/services/git/branch_hooks_service_spec.rb +++ b/spec/services/git/branch_hooks_service_spec.rb @@ -91,7 +91,7 @@ describe Git::BranchHooksService do end describe 'Push Event' do - let(:event) { Event.find_by_action(Event::PUSHED) } + let(:event) { Event.pushed_action.first } before do service.execute @@ -101,7 +101,7 @@ describe Git::BranchHooksService do it 'generates a push event with one commit' do expect(event).to be_an_instance_of(PushEvent) expect(event.project).to eq(project) - expect(event.action).to eq(Event::PUSHED) + expect(event).to be_pushed_action expect(event.push_event_payload).to be_an_instance_of(PushEventPayload) expect(event.push_event_payload.commit_from).to eq(oldrev) expect(event.push_event_payload.commit_to).to eq(newrev) @@ -117,7 +117,7 @@ describe Git::BranchHooksService do it 'generates a push event with more than one commit' do expect(event).to be_an_instance_of(PushEvent) expect(event.project).to eq(project) - expect(event.action).to eq(Event::PUSHED) + expect(event).to be_pushed_action expect(event.push_event_payload).to be_an_instance_of(PushEventPayload) expect(event.push_event_payload.commit_from).to be_nil expect(event.push_event_payload.commit_to).to eq(newrev) @@ -133,7 +133,7 @@ describe Git::BranchHooksService do it 'generates a push event with no commits' do expect(event).to be_an_instance_of(PushEvent) expect(event.project).to eq(project) - expect(event.action).to eq(Event::PUSHED) + expect(event).to be_pushed_action expect(event.push_event_payload).to be_an_instance_of(PushEventPayload) expect(event.push_event_payload.commit_from).to eq(oldrev) expect(event.push_event_payload.commit_to).to be_nil |