Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5b2e81f6
Commit
5b2e81f6
authored
Feb 18, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace set with let_it_be in spec/mailers
Removes usage of `set` in specs
parent
8a4b8776
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
spec/mailers/emails/pages_domains_spec.rb
spec/mailers/emails/pages_domains_spec.rb
+2
-2
spec/mailers/emails/pipelines_spec.rb
spec/mailers/emails/pipelines_spec.rb
+1
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+11
-11
No files found.
spec/mailers/emails/pages_domains_spec.rb
View file @
5b2e81f6
...
...
@@ -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
}
...
...
spec/mailers/emails/pipelines_spec.rb
View file @
5b2e81f6
...
...
@@ -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
...
...
spec/mailers/notify_spec.rb
View file @
5b2e81f6
...
...
@@ -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
(
:iss
ue
)
do
let_it_be
(
:issue
,
reload:
tr
ue
)
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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment