diff options
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_services/pipeline_email_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/issues_spec.rb | 1 | ||||
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/notification_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/workers/build_email_worker_spec.rb | 1 | ||||
-rw-r--r-- | spec/workers/emails_on_push_worker_spec.rb | 1 | ||||
-rw-r--r-- | spec/workers/pipeline_notification_worker_spec.rb | 2 |
10 files changed, 16 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 3b12f16b4db..0d2b4920835 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe Ci::Pipeline, models: true do + include EmailHelpers + let(:project) { FactoryGirl.create :empty_project } let(:pipeline) { FactoryGirl.create :ci_empty_pipeline, status: 'created', project: project } diff --git a/spec/models/project_services/pipeline_email_service_spec.rb b/spec/models/project_services/pipeline_email_service_spec.rb index 4f56bceda44..7c8824485f5 100644 --- a/spec/models/project_services/pipeline_email_service_spec.rb +++ b/spec/models/project_services/pipeline_email_service_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe PipelinesEmailService do + include EmailHelpers + let(:pipeline) do create(:ci_pipeline, project: project, sha: project.commit('master').sha) end diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index ae7994af981..9b52463ba29 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe API::API, api: true do include ApiHelpers + include EmailHelpers let(:user) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 4c878d748c0..500d224ff98 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -2,6 +2,8 @@ require 'spec_helper' describe Issues::UpdateService, services: true do + include EmailHelpers + let(:user) { create(:user) } let(:user2) { create(:user) } let(:user3) { create(:user) } diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 0bd6db1810a..790ef765f3a 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe MergeRequests::UpdateService, services: true do + include EmailHelpers + let(:project) { create(:project) } let(:user) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 08ae61708a5..f3e80ac22a0 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe NotificationService, services: true do + include EmailHelpers + let(:notification) { NotificationService.new } around(:each) do |example| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bead1a006d1..ef33c473d38 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -32,7 +32,7 @@ RSpec.configure do |config| config.include LoginHelpers, type: :feature config.include SearchHelpers, type: :feature config.include StubConfiguration - config.include EmailHelpers + config.include EmailHelpers, type: :mailer config.include TestEnv config.include ActiveJob::TestHelper config.include ActiveSupport::Testing::TimeHelpers diff --git a/spec/workers/build_email_worker_spec.rb b/spec/workers/build_email_worker_spec.rb index a1aa336361a..542e674c150 100644 --- a/spec/workers/build_email_worker_spec.rb +++ b/spec/workers/build_email_worker_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe BuildEmailWorker do + include EmailHelpers include RepoHelpers let(:build) { create(:ci_build) } diff --git a/spec/workers/emails_on_push_worker_spec.rb b/spec/workers/emails_on_push_worker_spec.rb index fc652f6f4c3..f27e413f7b8 100644 --- a/spec/workers/emails_on_push_worker_spec.rb +++ b/spec/workers/emails_on_push_worker_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe EmailsOnPushWorker do include RepoHelpers + include EmailHelpers include EmailSpec::Matchers let(:project) { create(:project) } diff --git a/spec/workers/pipeline_notification_worker_spec.rb b/spec/workers/pipeline_notification_worker_spec.rb index d487a719680..739f9b63967 100644 --- a/spec/workers/pipeline_notification_worker_spec.rb +++ b/spec/workers/pipeline_notification_worker_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe PipelineNotificationWorker do + include EmailHelpers + let(:pipeline) do create(:ci_pipeline, project: project, |