BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d46c1229
Commit
d46c1229
authored
Jun 03, 2018
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace have_html_espaced_body_text after
517598ba
parent
3579ed01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
notify_spec.rb
spec/mailers/notify_spec.rb
+19
-19
notify_shared_examples.rb
spec/support/shared_examples/notify_shared_examples.rb
+2
-2
No files found.
spec/mailers/notify_spec.rb
View file @
d46c1229
...
@@ -68,7 +68,7 @@ describe Notify do
...
@@ -68,7 +68,7 @@ describe Notify do
end
end
it
'contains the description'
do
it
'contains the description'
do
is_expected
.
to
have_
html_escaped_
body_text
issue
.
description
is_expected
.
to
have_body_text
issue
.
description
end
end
it
'does not add a reason header'
do
it
'does not add a reason header'
do
...
@@ -89,7 +89,7 @@ describe Notify do
...
@@ -89,7 +89,7 @@ describe Notify do
end
end
it
'contains a link to note author'
do
it
'contains a link to note author'
do
is_expected
.
to
have_
html_escaped_
body_text
(
issue
.
author_name
)
is_expected
.
to
have_body_text
(
issue
.
author_name
)
is_expected
.
to
have_body_text
'created an issue:'
is_expected
.
to
have_body_text
'created an issue:'
end
end
end
end
...
@@ -115,8 +115,8 @@ describe Notify do
...
@@ -115,8 +115,8 @@ describe Notify do
it
'has the correct subject and body'
do
it
'has the correct subject and body'
do
aggregate_failures
do
aggregate_failures
do
is_expected
.
to
have_referable_subject
(
issue
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
issue
,
reply:
true
)
is_expected
.
to
have_
html_escaped_
body_text
(
previous_assignee
.
name
)
is_expected
.
to
have_body_text
(
previous_assignee
.
name
)
is_expected
.
to
have_
html_escaped_
body_text
(
assignee
.
name
)
is_expected
.
to
have_body_text
(
assignee
.
name
)
is_expected
.
to
have_body_text
(
project_issue_path
(
project
,
issue
))
is_expected
.
to
have_body_text
(
project_issue_path
(
project
,
issue
))
end
end
end
end
...
@@ -190,7 +190,7 @@ describe Notify do
...
@@ -190,7 +190,7 @@ describe Notify do
aggregate_failures
do
aggregate_failures
do
is_expected
.
to
have_referable_subject
(
issue
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
issue
,
reply:
true
)
is_expected
.
to
have_body_text
(
status
)
is_expected
.
to
have_body_text
(
status
)
is_expected
.
to
have_
html_escaped_
body_text
(
current_user
.
name
)
is_expected
.
to
have_body_text
(
current_user
.
name
)
is_expected
.
to
have_body_text
(
project_issue_path
project
,
issue
)
is_expected
.
to
have_body_text
(
project_issue_path
project
,
issue
)
end
end
end
end
...
@@ -243,7 +243,7 @@ describe Notify do
...
@@ -243,7 +243,7 @@ describe Notify do
end
end
it
'contains the description'
do
it
'contains the description'
do
is_expected
.
to
have_
html_escaped_
body_text
merge_request
.
description
is_expected
.
to
have_body_text
merge_request
.
description
end
end
context
'when sent with a reason'
do
context
'when sent with a reason'
do
...
@@ -260,7 +260,7 @@ describe Notify do
...
@@ -260,7 +260,7 @@ describe Notify do
end
end
it
'contains a link to note author'
do
it
'contains a link to note author'
do
is_expected
.
to
have_
html_escaped_
body_text
merge_request
.
author_name
is_expected
.
to
have_body_text
merge_request
.
author_name
is_expected
.
to
have_body_text
'created a merge request:'
is_expected
.
to
have_body_text
'created a merge request:'
end
end
end
end
...
@@ -286,9 +286,9 @@ describe Notify do
...
@@ -286,9 +286,9 @@ describe Notify do
it
'has the correct subject and body'
do
it
'has the correct subject and body'
do
aggregate_failures
do
aggregate_failures
do
is_expected
.
to
have_referable_subject
(
merge_request
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
merge_request
,
reply:
true
)
is_expected
.
to
have_
html_escaped_
body_text
(
previous_assignee
.
name
)
is_expected
.
to
have_body_text
(
previous_assignee
.
name
)
is_expected
.
to
have_body_text
(
project_merge_request_path
(
project
,
merge_request
))
is_expected
.
to
have_body_text
(
project_merge_request_path
(
project
,
merge_request
))
is_expected
.
to
have_
html_escaped_
body_text
(
assignee
.
name
)
is_expected
.
to
have_body_text
(
assignee
.
name
)
end
end
end
end
...
@@ -358,7 +358,7 @@ describe Notify do
...
@@ -358,7 +358,7 @@ describe Notify do
aggregate_failures
do
aggregate_failures
do
is_expected
.
to
have_referable_subject
(
merge_request
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
merge_request
,
reply:
true
)
is_expected
.
to
have_body_text
(
status
)
is_expected
.
to
have_body_text
(
status
)
is_expected
.
to
have_
html_escaped_
body_text
(
current_user
.
name
)
is_expected
.
to
have_body_text
(
current_user
.
name
)
is_expected
.
to
have_body_text
(
project_merge_request_path
(
project
,
merge_request
))
is_expected
.
to
have_body_text
(
project_merge_request_path
(
project
,
merge_request
))
end
end
end
end
...
@@ -526,7 +526,7 @@ describe Notify do
...
@@ -526,7 +526,7 @@ describe Notify do
it
'has the correct subject and body'
do
it
'has the correct subject and body'
do
is_expected
.
to
have_referable_subject
(
project_snippet
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
project_snippet
,
reply:
true
)
is_expected
.
to
have_
html_escaped_
body_text
project_snippet_note
.
note
is_expected
.
to
have_body_text
project_snippet_note
.
note
end
end
end
end
...
@@ -539,7 +539,7 @@ describe Notify do
...
@@ -539,7 +539,7 @@ describe Notify do
it
'has the correct subject and body'
do
it
'has the correct subject and body'
do
is_expected
.
to
have_subject
(
"
#{
project
.
name
}
| Project was moved"
)
is_expected
.
to
have_subject
(
"
#{
project
.
name
}
| Project was moved"
)
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
(
project
.
ssh_url_to_repo
)
is_expected
.
to
have_body_text
(
project
.
ssh_url_to_repo
)
end
end
end
end
...
@@ -566,7 +566,7 @@ describe Notify do
...
@@ -566,7 +566,7 @@ describe Notify do
expect
(
to_emails
).
to
eq
([
recipient
.
notification_email
])
expect
(
to_emails
).
to
eq
([
recipient
.
notification_email
])
is_expected
.
to
have_subject
"Request to join the
#{
project
.
full_name
}
project"
is_expected
.
to
have_subject
"Request to join the
#{
project
.
full_name
}
project"
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project_project_members_url
(
project
)
is_expected
.
to
have_body_text
project_project_members_url
(
project
)
is_expected
.
to
have_body_text
project_member
.
human_access
is_expected
.
to
have_body_text
project_member
.
human_access
end
end
...
@@ -586,7 +586,7 @@ describe Notify do
...
@@ -586,7 +586,7 @@ describe Notify do
it
'contains all the useful information'
do
it
'contains all the useful information'
do
is_expected
.
to
have_subject
"Access to the
#{
project
.
full_name
}
project was denied"
is_expected
.
to
have_subject
"Access to the
#{
project
.
full_name
}
project was denied"
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project
.
web_url
end
end
end
end
...
@@ -603,7 +603,7 @@ describe Notify do
...
@@ -603,7 +603,7 @@ describe Notify do
it
'contains all the useful information'
do
it
'contains all the useful information'
do
is_expected
.
to
have_subject
"Access to the
#{
project
.
full_name
}
project was granted"
is_expected
.
to
have_subject
"Access to the
#{
project
.
full_name
}
project was granted"
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project_member
.
human_access
is_expected
.
to
have_body_text
project_member
.
human_access
end
end
...
@@ -633,7 +633,7 @@ describe Notify do
...
@@ -633,7 +633,7 @@ describe Notify do
it
'contains all the useful information'
do
it
'contains all the useful information'
do
is_expected
.
to
have_subject
"Invitation to join the
#{
project
.
full_name
}
project"
is_expected
.
to
have_subject
"Invitation to join the
#{
project
.
full_name
}
project"
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project_member
.
human_access
is_expected
.
to
have_body_text
project_member
.
human_access
is_expected
.
to
have_body_text
project_member
.
invite_token
is_expected
.
to
have_body_text
project_member
.
invite_token
...
@@ -657,7 +657,7 @@ describe Notify do
...
@@ -657,7 +657,7 @@ describe Notify do
it
'contains all the useful information'
do
it
'contains all the useful information'
do
is_expected
.
to
have_subject
'Invitation accepted'
is_expected
.
to
have_subject
'Invitation accepted'
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project_member
.
invite_email
is_expected
.
to
have_body_text
project_member
.
invite_email
is_expected
.
to
have_body_text
invited_user
.
name
is_expected
.
to
have_body_text
invited_user
.
name
...
@@ -680,7 +680,7 @@ describe Notify do
...
@@ -680,7 +680,7 @@ describe Notify do
it
'contains all the useful information'
do
it
'contains all the useful information'
do
is_expected
.
to
have_subject
'Invitation declined'
is_expected
.
to
have_subject
'Invitation declined'
is_expected
.
to
have_
html_escaped_
body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
full_name
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project
.
web_url
is_expected
.
to
have_body_text
project_member
.
invite_email
is_expected
.
to
have_body_text
project_member
.
invite_email
end
end
...
@@ -1396,7 +1396,7 @@ describe Notify do
...
@@ -1396,7 +1396,7 @@ describe Notify do
it
'has the correct subject and body'
do
it
'has the correct subject and body'
do
is_expected
.
to
have_referable_subject
(
personal_snippet
,
reply:
true
)
is_expected
.
to
have_referable_subject
(
personal_snippet
,
reply:
true
)
is_expected
.
to
have_
html_escaped_
body_text
personal_snippet_note
.
note
is_expected
.
to
have_body_text
personal_snippet_note
.
note
end
end
end
end
end
end
spec/support/shared_examples/notify_shared_examples.rb
View file @
d46c1229
...
@@ -212,7 +212,7 @@ shared_examples 'a note email' do
...
@@ -212,7 +212,7 @@ shared_examples 'a note email' do
end
end
it
'contains the message from the note'
do
it
'contains the message from the note'
do
is_expected
.
to
have_
html_escaped_
body_text
note
.
note
is_expected
.
to
have_body_text
note
.
note
end
end
it
'does not contain note author'
do
it
'does not contain note author'
do
...
@@ -225,7 +225,7 @@ shared_examples 'a note email' do
...
@@ -225,7 +225,7 @@ shared_examples 'a note email' do
end
end
it
'contains a link to note author'
do
it
'contains a link to note author'
do
is_expected
.
to
have_
html_escaped_
body_text
note
.
author_name
is_expected
.
to
have_body_text
note
.
author_name
end
end
end
end
end
end
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