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
b8917eb7
Commit
b8917eb7
authored
Nov 23, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec style
parent
87a2762b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
notify_spec.rb
spec/mailers/notify_spec.rb
+1
-0
discussion_spec.rb
spec/models/discussion_spec.rb
+4
-10
No files found.
spec/mailers/notify_spec.rb
View file @
b8917eb7
...
...
@@ -646,6 +646,7 @@ describe Notify do
before
(
:each
)
{
allow
(
note
).
to
receive
(
:noteable
).
and_return
(
merge_request
)
}
subject
{
Notify
.
note_merge_request_email
(
recipient
.
id
,
note
.
id
)
}
it_behaves_like
'a note email'
it_behaves_like
'an answer to an existing thread with reply-by-email enabled'
do
let
(
:model
)
{
merge_request
}
...
...
spec/models/discussion_spec.rb
View file @
b8917eb7
...
...
@@ -595,23 +595,17 @@ describe Discussion, model: true do
let
(
:truncated_lines
)
{
subject
.
truncated_diff_lines
}
context
"when diff is greater than allowed number of truncated diff lines "
do
let
(
:initial_line_count
)
{
subject
.
diff_lines
.
count
}
let
(
:truncated_line_count
)
{
truncated_lines
.
count
}
it
"returns fewer lines"
do
expect
(
initial_line_
count
).
to
be
>
described_class
::
NUMBER_OF_TRUNCATED_DIFF_LINES
expect
(
subject
.
diff_lines
.
count
).
to
be
>
described_class
::
NUMBER_OF_TRUNCATED_DIFF_LINES
expect
(
truncated_line
_
count
).
to
be
<=
described_class
::
NUMBER_OF_TRUNCATED_DIFF_LINES
expect
(
truncated_line
s
.
count
).
to
be
<=
described_class
::
NUMBER_OF_TRUNCATED_DIFF_LINES
end
end
context
"when some diff lines are meta"
do
let
(
:initial_meta_lines?
)
{
subject
.
diff_lines
.
any?
(
&
:meta?
)
}
let
(
:truncated_meta_lines?
)
{
truncated_lines
.
any?
(
&
:meta?
)
}
it
"returns no meta lines"
do
expect
(
initial_meta_lines?
).
to
be
true
expect
(
truncated_
meta_lines?
).
to
be
false
expect
(
subject
.
diff_lines
).
to
include
(
be_meta
)
expect
(
truncated_
lines
).
not_to
include
(
be_meta
)
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