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
78c8bce1
Commit
78c8bce1
authored
Dec 15, 2016
by
Berna Castro
Committed by
Oswaldo Ferreira
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and add specs for Issue#to_reference
parent
1c749880
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
issue_spec.rb
spec/models/issue_spec.rb
+10
-1
No files found.
spec/models/issue_spec.rb
View file @
78c8bce1
...
...
@@ -27,7 +27,11 @@ describe Issue, models: true do
let
(
:issue
)
{
build
(
:issue
,
iid:
1
,
project:
project
)
}
it
'returns a String reference to the object'
do
expect
(
issue
.
to_reference
).
to
eq
"#1"
expect
(
issue
.
to_reference
).
to
eq
"
#{
project
.
namespace
.
name
}
/sample-project#1"
end
it
'supports a project reference'
do
expect
(
issue
.
to_reference
(
project
)).
to
eq
"#1"
end
it
'returns a String reference with the full path'
do
...
...
@@ -38,6 +42,11 @@ describe Issue, models: true do
another_project
=
build
(
:empty_project
,
name:
'another-project'
,
namespace:
project
.
namespace
)
expect
(
issue
.
to_reference
(
another_project
)).
to
eq
"sample-project#1"
end
it
'supports a group reference'
do
group
=
build
(
:group
,
name:
'sample-group'
)
expect
(
issue
.
to_reference
(
nil
,
group
)).
to
eq
(
"sample-project#1"
)
end
end
describe
'#is_being_reassigned?'
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