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
83904275
Commit
83904275
authored
May 10, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spec SystemNoteService.cross_reference_disallowed?
parent
19142f40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+26
-2
No files found.
spec/services/system_note_service_spec.rb
View file @
83904275
...
...
@@ -274,8 +274,32 @@ describe SystemNoteService do
end
end
# TODO (rspeicher)
describe
'.cross_reference_disallowed?'
describe
'.cross_reference_disallowed?'
do
context
'when mentioner is not a MergeRequest'
do
it
'is falsey'
do
mentioner
=
noteable
.
dup
expect
(
described_class
.
cross_reference_disallowed?
(
noteable
,
mentioner
)).
to
be_falsey
end
end
context
'when mentioner is a MergeRequest'
do
let
(
:mentioner
)
{
create
(
:merge_request
,
:simple
,
source_project:
project
)
}
let
(
:noteable
)
{
project
.
commit
}
it
'is truthy when noteable is in commits'
do
expect
(
mentioner
).
to
receive
(
:commits
).
and_return
([
noteable
])
expect
(
described_class
.
cross_reference_disallowed?
(
noteable
,
mentioner
)).
to
be_truthy
end
it
'is falsey when noteable is not in commits'
do
expect
(
mentioner
).
to
receive
(
:commits
).
and_return
([])
expect
(
described_class
.
cross_reference_disallowed?
(
noteable
,
mentioner
)).
to
be_falsey
end
end
end
describe
'.cross_reference_exists?'
do
let
(
:commit0
)
{
project
.
commit
}
...
...
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