Commit 819f459b authored by Robert Speicher's avatar Robert Speicher

Only include EmailHelpers in mailer specs and specs using them

parent 7633e4ae
require 'spec_helper' require 'spec_helper'
describe Ci::Pipeline, models: true do describe Ci::Pipeline, models: true do
include EmailHelpers
let(:project) { FactoryGirl.create :empty_project } let(:project) { FactoryGirl.create :empty_project }
let(:pipeline) { FactoryGirl.create :ci_empty_pipeline, status: 'created', project: project } let(:pipeline) { FactoryGirl.create :ci_empty_pipeline, status: 'created', project: project }
......
require 'spec_helper' require 'spec_helper'
describe PipelinesEmailService do describe PipelinesEmailService do
include EmailHelpers
let(:pipeline) do let(:pipeline) do
create(:ci_pipeline, project: project, sha: project.commit('master').sha) create(:ci_pipeline, project: project, sha: project.commit('master').sha)
end end
......
...@@ -2,6 +2,7 @@ require 'spec_helper' ...@@ -2,6 +2,7 @@ require 'spec_helper'
describe API::API, api: true do describe API::API, api: true do
include ApiHelpers include ApiHelpers
include EmailHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
require 'spec_helper' require 'spec_helper'
describe Issues::UpdateService, services: true do describe Issues::UpdateService, services: true do
include EmailHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:user3) { create(:user) } let(:user3) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::UpdateService, services: true do describe MergeRequests::UpdateService, services: true do
include EmailHelpers
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe NotificationService, services: true do describe NotificationService, services: true do
include EmailHelpers
let(:notification) { NotificationService.new } let(:notification) { NotificationService.new }
around(:each) do |example| around(:each) do |example|
......
...@@ -32,7 +32,7 @@ RSpec.configure do |config| ...@@ -32,7 +32,7 @@ RSpec.configure do |config|
config.include LoginHelpers, type: :feature config.include LoginHelpers, type: :feature
config.include SearchHelpers, type: :feature config.include SearchHelpers, type: :feature
config.include StubConfiguration config.include StubConfiguration
config.include EmailHelpers config.include EmailHelpers, type: :mailer
config.include TestEnv config.include TestEnv
config.include ActiveJob::TestHelper config.include ActiveJob::TestHelper
config.include ActiveSupport::Testing::TimeHelpers config.include ActiveSupport::Testing::TimeHelpers
......
require 'spec_helper' require 'spec_helper'
describe BuildEmailWorker do describe BuildEmailWorker do
include EmailHelpers
include RepoHelpers include RepoHelpers
let(:build) { create(:ci_build) } let(:build) { create(:ci_build) }
......
...@@ -2,6 +2,7 @@ require 'spec_helper' ...@@ -2,6 +2,7 @@ require 'spec_helper'
describe EmailsOnPushWorker do describe EmailsOnPushWorker do
include RepoHelpers include RepoHelpers
include EmailHelpers
include EmailSpec::Matchers include EmailSpec::Matchers
let(:project) { create(:project) } let(:project) { create(:project) }
......
require 'spec_helper' require 'spec_helper'
describe PipelineNotificationWorker do describe PipelineNotificationWorker do
include EmailHelpers
let(:pipeline) do let(:pipeline) do
create(:ci_pipeline, create(:ci_pipeline,
project: project, project: project,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment