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
630742d0
Commit
630742d0
authored
Apr 27, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs in spec/helpers/merge_requests_helper_spec.rb
parent
6214b80b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
spec/helpers/merge_request_helper_spec.rb
spec/helpers/merge_request_helper_spec.rb
+34
-6
No files found.
spec/helpers/merge_request_helper_spec.rb
View file @
630742d0
...
...
@@ -20,24 +20,52 @@ describe MergeRequestsHelper do
end
end
describe
'issues_sentence'
do
describe
'#issues_sentence'
do
let
(
:project
)
{
create
:project
}
subject
{
issues_sentence
(
issues
)
}
let
(
:issues
)
do
[
build
(
:issue
,
iid:
1
),
build
(
:issue
,
iid:
2
),
build
(
:issue
,
iid:
3
)]
[
build
(
:issue
,
iid:
2
,
project:
project
),
build
(
:issue
,
iid:
3
,
project:
project
),
build
(
:issue
,
iid:
1
,
project:
project
)]
end
it
{
is_expected
.
to
eq
(
'#1, #2, and #3'
)
}
it
do
@project
=
project
is_expected
.
to
eq
(
'#1, #2, and #3'
)
end
context
'for JIRA issues'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:issues
)
do
[
ExternalIssue
.
new
(
'JIRA-123'
,
project
),
ExternalIssue
.
new
(
'JIRA-456'
,
project
),
ExternalIssue
.
new
(
'FOOBAR-7890'
,
project
)
ExternalIssue
.
new
(
'FOOBAR-7890'
,
project
),
ExternalIssue
.
new
(
'JIRA-123'
,
project
)
]
end
it
{
is_expected
.
to
eq
(
'FOOBAR-7890, JIRA-123, and JIRA-456'
)
}
it
do
@project
=
project
is_expected
.
to
eq
(
'FOOBAR-7890, JIRA-123, and JIRA-456'
)
end
end
context
'for issues from multiple namespaces'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:other_project
)
{
create
(
:project
)
}
let
(
:issues
)
do
[
build
(
:issue
,
iid:
2
,
project:
project
),
build
(
:issue
,
iid:
3
,
project:
other_project
),
build
(
:issue
,
iid:
1
,
project:
project
)]
end
it
do
@project
=
project
is_expected
.
to
eq
(
"#1, #2, and
#{
other_project
.
namespace
.
path
}
/
#{
other_project
.
path
}
#3"
)
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