summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 15:08:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 15:08:51 +0000
commit163a7046ac76eb4109184e82ce0af911633e6626 (patch)
tree9f22bb438db435d518e8f5520b309c6319ae0bd8 /spec/mailers
parent0637ba1e6e9024f35b2cbf561d9002ec17350bb3 (diff)
downloadgitlab-ce-163a7046ac76eb4109184e82ce0af911633e6626.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/pages_domains_spec.rb4
-rw-r--r--spec/mailers/emails/pipelines_spec.rb2
-rw-r--r--spec/mailers/notify_spec.rb22
3 files changed, 14 insertions, 14 deletions
diff --git a/spec/mailers/emails/pages_domains_spec.rb b/spec/mailers/emails/pages_domains_spec.rb
index e360e38256e..78887cef7ab 100644
--- a/spec/mailers/emails/pages_domains_spec.rb
+++ b/spec/mailers/emails/pages_domains_spec.rb
@@ -7,8 +7,8 @@ describe Emails::PagesDomains do
include EmailSpec::Matchers
include_context 'gitlab email notification'
- set(:domain) { create(:pages_domain, project: project) }
- set(:user) { project.creator }
+ let_it_be(:domain, reload: true) { create(:pages_domain, project: project) }
+ let_it_be(:user) { project.creator }
shared_examples 'a pages domain email' do
let(:recipient) { user }
diff --git a/spec/mailers/emails/pipelines_spec.rb b/spec/mailers/emails/pipelines_spec.rb
index ad1aa915fbb..9996bd9a6c4 100644
--- a/spec/mailers/emails/pipelines_spec.rb
+++ b/spec/mailers/emails/pipelines_spec.rb
@@ -6,7 +6,7 @@ require 'email_spec'
describe Emails::Pipelines do
include EmailSpec::Matchers
- set(:project) { create(:project, :repository) }
+ let_it_be(:project) { create(:project, :repository) }
shared_examples_for 'correct pipeline information' do
it 'has a correct information' do
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 19b15a6c6e2..f49abb24c44 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -13,11 +13,11 @@ describe Notify do
let(:current_user_sanitized) { 'www_example_com' }
- set(:user) { create(:user) }
- set(:current_user) { create(:user, email: "current@email.com", name: 'www.example.com') }
- set(:assignee) { create(:user, email: 'assignee@example.com', name: 'John Doe') }
+ let_it_be(:user) { create(:user) }
+ let_it_be(:current_user) { create(:user, email: "current@email.com", name: 'www.example.com') }
+ let_it_be(:assignee) { create(:user, email: 'assignee@example.com', name: 'John Doe') }
- set(:merge_request) do
+ let_it_be(:merge_request) do
create(:merge_request, source_project: project,
target_project: project,
author: current_user,
@@ -25,7 +25,7 @@ describe Notify do
description: 'Awesome description')
end
- set(:issue) do
+ let_it_be(:issue, reload: true) do
create(:issue, author: current_user,
assignees: [assignee],
project: project,
@@ -487,7 +487,7 @@ describe Notify do
end
describe 'that are unmergeable' do
- set(:merge_request) do
+ let_it_be(:merge_request) do
create(:merge_request, :conflict,
source_project: project,
target_project: project,
@@ -568,7 +568,7 @@ describe Notify do
end
describe '#mail_thread' do
- set(:mail_thread_note) { create(:note) }
+ let_it_be(:mail_thread_note) { create(:note) }
let(:headers) do
{
@@ -638,9 +638,9 @@ describe Notify do
let(:host) { Gitlab.config.gitlab.host }
context 'in discussion' do
- set(:first_note) { create(:discussion_note_on_issue, project: project) }
- set(:second_note) { create(:discussion_note_on_issue, in_reply_to: first_note, project: project) }
- set(:third_note) { create(:discussion_note_on_issue, in_reply_to: second_note, project: project) }
+ let_it_be(:first_note) { create(:discussion_note_on_issue, project: project) }
+ let_it_be(:second_note) { create(:discussion_note_on_issue, in_reply_to: first_note, project: project) }
+ let_it_be(:third_note) { create(:discussion_note_on_issue, in_reply_to: second_note, project: project) }
subject { described_class.note_issue_email(recipient.id, third_note.id) }
@@ -664,7 +664,7 @@ describe Notify do
end
context 'individual issue comments' do
- set(:note) { create(:note_on_issue, project: project) }
+ let_it_be(:note) { create(:note_on_issue, project: project) }
subject { described_class.note_issue_email(recipient.id, note.id) }