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
321dcc2a
Commit
321dcc2a
authored
May 01, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] add spec for users_dropdown_label
parent
48eca938
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
spec/helpers/issuables_helper_spec.rb
spec/helpers/issuables_helper_spec.rb
+18
-0
No files found.
spec/helpers/issuables_helper_spec.rb
View file @
321dcc2a
...
...
@@ -4,6 +4,24 @@ describe IssuablesHelper do
let
(
:label
)
{
build_stubbed
(
:label
)
}
let
(
:label2
)
{
build_stubbed
(
:label
)
}
describe
'#users_dropdown_label'
do
let
(
:user
)
{
build_stubbed
(
:user
)
}
let
(
:user2
)
{
build_stubbed
(
:user
)
}
it
'returns unassigned'
do
expect
(
users_dropdown_label
([])).
to
eq
(
'Unassigned'
)
end
it
'returns selected user\'s name'
do
expect
(
users_dropdown_label
([
user
])).
to
eq
(
user
.
name
)
end
it
'returns selected user\'s name and counter'
do
expect
(
users_dropdown_label
([
user
,
user2
])).
to
eq
(
"
#{
user
.
name
}
+ 1 more"
)
end
end
describe
'#issuable_labels_tooltip'
do
it
'returns label text'
do
expect
(
issuable_labels_tooltip
([
label
])).
to
eq
(
label
.
title
)
...
...
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