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
259e3b55
Commit
259e3b55
authored
Mar 18, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
27360e65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+9
-7
No files found.
spec/mailers/notify_spec.rb
View file @
259e3b55
...
...
@@ -623,8 +623,9 @@ describe Notify do
let
(
:commits
)
{
Commit
.
decorate
(
compare
.
commits
,
nil
)
}
let
(
:diff_path
)
{
namespace_project_compare_path
(
project
.
namespace
,
project
,
from:
Commit
.
new
(
compare
.
base
,
project
),
to:
Commit
.
new
(
compare
.
head
,
project
))
}
let
(
:send_from_committer_email
)
{
false
}
let
(
:diff_refs
)
{
[
project
.
merge_base_commit
(
sample_image_commit
.
id
,
sample_commit
.
id
),
project
.
commit
(
sample_commit
.
id
)]
}
subject
{
Notify
.
repository_push_email
(
project
.
id
,
'devs@company.name'
,
author_id:
user
.
id
,
ref:
'refs/heads/master'
,
action: :push
,
compare:
compare
,
reverse_compare:
false
,
send_from_committer_email:
send_from_committer_email
)
}
subject
{
Notify
.
repository_push_email
(
project
.
id
,
'devs@company.name'
,
author_id:
user
.
id
,
ref:
'refs/heads/master'
,
action: :push
,
compare:
compare
,
reverse_compare:
false
,
diff_refs:
diff_refs
,
send_from_committer_email:
send_from_committer_email
)
}
it_behaves_like
'it should not have Gmail Actions links'
it_behaves_like
"a user cannot unsubscribe through footer link"
...
...
@@ -649,15 +650,15 @@ describe Notify do
is_expected
.
to
have_body_text
/Change some files/
end
it
'includes diffs'
do
is_expected
.
to
have_body_text
/def
archive_formats_regex/
it
'includes diffs
with character-level highlighting
'
do
is_expected
.
to
have_body_text
/def
<\/span> <span class=\"nf\">
archive_formats_regex/
end
it
'contains a link to the diff'
do
is_expected
.
to
have_body_text
/
#{
diff_path
}
/
end
it
'does
n
not contain the misleading footer'
do
it
'does not contain the misleading footer'
do
is_expected
.
not_to
have_body_text
/you are a member of/
end
...
...
@@ -731,8 +732,9 @@ describe Notify do
let
(
:compare
)
{
Gitlab
::
Git
::
Compare
.
new
(
project
.
repository
.
raw_repository
,
sample_commit
.
parent_id
,
sample_commit
.
id
)
}
let
(
:commits
)
{
Commit
.
decorate
(
compare
.
commits
,
nil
)
}
let
(
:diff_path
)
{
namespace_project_commit_path
(
project
.
namespace
,
project
,
commits
.
first
)
}
let
(
:diff_refs
)
{
[
project
.
merge_base_commit
(
sample_commit
.
parent_id
,
sample_commit
.
id
),
project
.
commit
(
sample_commit
.
id
)]
}
subject
{
Notify
.
repository_push_email
(
project
.
id
,
'devs@company.name'
,
author_id:
user
.
id
,
ref:
'refs/heads/master'
,
action: :push
,
compare:
compare
)
}
subject
{
Notify
.
repository_push_email
(
project
.
id
,
'devs@company.name'
,
author_id:
user
.
id
,
ref:
'refs/heads/master'
,
action: :push
,
compare:
compare
,
diff_refs:
diff_refs
)
}
it_behaves_like
'it should show Gmail Actions View Commit link'
it_behaves_like
"a user cannot unsubscribe through footer link"
...
...
@@ -757,8 +759,8 @@ describe Notify do
is_expected
.
to
have_body_text
/Change some files/
end
it
'includes diffs'
do
is_expected
.
to
have_body_text
/def
archive_formats_regex/
it
'includes diffs
with character-level highlighting
'
do
is_expected
.
to
have_body_text
/def
<\/span> <span class=\"nf\">
archive_formats_regex/
end
it
'contains a link to the diff'
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