diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/models/project_services/emails_on_push_service_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/models/project_services/emails_on_push_service_spec.rb')
-rw-r--r-- | spec/models/project_services/emails_on_push_service_spec.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/models/project_services/emails_on_push_service_spec.rb b/spec/models/project_services/emails_on_push_service_spec.rb index ce1952b503f..44db95afc57 100644 --- a/spec/models/project_services/emails_on_push_service_spec.rb +++ b/spec/models/project_services/emails_on_push_service_spec.rb @@ -21,23 +21,25 @@ describe EmailsOnPushService do end end - context 'when properties is missing branches_to_be_notified' do - subject { described_class.new(properties: {}) } + describe '.new' do + context 'when properties is missing branches_to_be_notified' do + subject { described_class.new(properties: {}) } - it 'sets the default value to all' do - expect(subject.branches_to_be_notified).to eq('all') + it 'sets the default value to all' do + expect(subject.branches_to_be_notified).to eq('all') + end end - end - context 'when branches_to_be_notified is already set' do - subject { described_class.new(properties: { branches_to_be_notified: 'protected' }) } + context 'when branches_to_be_notified is already set' do + subject { described_class.new(properties: { branches_to_be_notified: 'protected' }) } - it 'does not overwrite it with the default value' do - expect(subject.branches_to_be_notified).to eq('protected') + it 'does not overwrite it with the default value' do + expect(subject.branches_to_be_notified).to eq('protected') + end end end - context 'project emails' do + describe '#execute' do let(:push_data) { { object_kind: 'push' } } let(:project) { create(:project, :repository) } let(:service) { create(:emails_on_push_service, project: project) } |