diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-03 16:42:02 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-03 16:42:02 +0000 |
commit | 29f1fa8250407067683cc0a58350ab4ef5ee3189 (patch) | |
tree | 6d8cf368c0cdf972f909a680225a4ad1b3e17563 /spec/models | |
parent | 2209e35f92e1247bf0dbd80bb5b8a194c9d0dc1f (diff) | |
parent | bb5f79d43e0bb20bacd5ecd8b66832d9857bd079 (diff) | |
download | gitlab-ce-29f1fa8250407067683cc0a58350ab4ef5ee3189.tar.gz |
Merge branch 'use-rspec-support-helper' into 'master'
Don't include EmailHelpers manually, pick with rspec
See merge request !13257
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/deploy_key_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/gpg_key_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/key_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/project_services/pipelines_email_service_spec.rb | 8 |
5 files changed, 5 insertions, 21 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index f63ff19c2fc..ac75c6501ee 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe Ci::Pipeline do - include EmailHelpers - +describe Ci::Pipeline, :mailer do let(:user) { create(:user) } let(:project) { create(:project) } @@ -1248,8 +1246,6 @@ describe Ci::Pipeline do pipeline.user.global_notification_setting .update(level: 'custom', failed_pipeline: true, success_pipeline: true) - reset_delivered_emails! - perform_enqueued_jobs do pipeline.enqueue pipeline.run diff --git a/spec/models/deploy_key_spec.rb b/spec/models/deploy_key_spec.rb index 2aece75b817..3d7283e2164 100644 --- a/spec/models/deploy_key_spec.rb +++ b/spec/models/deploy_key_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe DeployKey do - include EmailHelpers - +describe DeployKey, :mailer do describe "Associations" do it { is_expected.to have_many(:deploy_keys_projects) } it { is_expected.to have_many(:projects) } diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb index 59c074199db..e48f20bf53b 100644 --- a/spec/models/gpg_key_spec.rb +++ b/spec/models/gpg_key_spec.rb @@ -114,9 +114,7 @@ describe GpgKey do end end - describe 'notification' do - include EmailHelpers - + describe 'notification', :mailer do let(:user) { create(:user) } it 'sends a notification' do diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 251d0cfd08c..0daeb337168 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe Key do - include EmailHelpers - +describe Key, :mailer do describe "Associations" do it { is_expected.to belong_to(:user) } end diff --git a/spec/models/project_services/pipelines_email_service_spec.rb b/spec/models/project_services/pipelines_email_service_spec.rb index 03932895b0e..5faab9ba38b 100644 --- a/spec/models/project_services/pipelines_email_service_spec.rb +++ b/spec/models/project_services/pipelines_email_service_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe PipelinesEmailService do - include EmailHelpers - +describe PipelinesEmailService, :mailer do let(:pipeline) do create(:ci_pipeline, project: project, sha: project.commit('master').sha) end @@ -14,10 +12,6 @@ describe PipelinesEmailService do Gitlab::DataBuilder::Pipeline.build(pipeline) end - before do - reset_delivered_emails! - end - describe 'Validations' do context 'when service is active' do before do |