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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
048f124a
Commit
048f124a
authored
Sep 28, 2016
by
Fu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move spec back into shared example `an email sent from GitLab`
parent
2a438f45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+0
-7
spec/mailers/shared/notify.rb
spec/mailers/shared/notify.rb
+10
-0
No files found.
spec/mailers/notify_spec.rb
View file @
048f124a
...
@@ -1094,11 +1094,4 @@ describe Notify do
...
@@ -1094,11 +1094,4 @@ describe Notify do
is_expected
.
to
have_body_text
/
#{
diff_path
}
/
is_expected
.
to
have_body_text
/
#{
diff_path
}
/
end
end
end
end
describe
'email has correct subject'
do
it
'has correct suffix'
do
stub_config_setting
(
email_subject_suffix:
'A Nice Suffix'
)
is_expected
.
to
have_subject
/\| A Nice Suffix$/
end
end
end
end
spec/mailers/shared/notify.rb
View file @
048f124a
...
@@ -37,6 +37,16 @@ shared_examples 'an email sent from GitLab' do
...
@@ -37,6 +37,16 @@ shared_examples 'an email sent from GitLab' do
reply_to
=
subject
.
header
[
:reply_to
].
addresses
reply_to
=
subject
.
header
[
:reply_to
].
addresses
expect
(
reply_to
).
to
eq
([
gitlab_sender_reply_to
])
expect
(
reply_to
).
to
eq
([
gitlab_sender_reply_to
])
end
end
context
'when custom suffix for email subject is set'
do
before
do
stub_config_setting
(
email_subject_suffix:
'A Nice Suffix'
)
end
it
'ends the subject with the suffix'
do
is_expected
.
to
have_subject
(
/ \| A Nice Suffix$/
)
end
end
end
end
shared_examples
'an email that contains a header with author username'
do
shared_examples
'an email that contains a header with author username'
do
...
...
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