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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
8d5ad4e3
Commit
8d5ad4e3
authored
Apr 07, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve specs code syntax
parent
9e6c6137
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
spec/helpers/issues_helper_spec.rb
spec/helpers/issues_helper_spec.rb
+11
-11
No files found.
spec/helpers/issues_helper_spec.rb
View file @
8d5ad4e3
...
...
@@ -80,7 +80,7 @@ describe IssuesHelper do
end
end
describe
'
#
url_for_new_issue'
do
describe
'url_for_new_issue'
do
let
(
:issues_url
)
{
ext_project
.
external_issue_tracker
.
new_issue_url
}
let
(
:ext_expected
)
do
issues_url
.
gsub
(
':project_id'
,
ext_project
.
id
.
to_s
)
...
...
@@ -117,7 +117,7 @@ describe IssuesHelper do
end
end
describe
"
#
merge_requests_sentence"
do
describe
"merge_requests_sentence"
do
subject
{
merge_requests_sentence
(
merge_requests
)}
let
(
:merge_requests
)
do
[
build
(
:merge_request
,
iid:
1
),
build
(
:merge_request
,
iid:
2
),
...
...
@@ -127,7 +127,7 @@ describe IssuesHelper do
it
{
is_expected
.
to
eq
(
"!1, !2, or !3"
)
}
end
describe
"
#
note_active_class"
do
describe
"note_active_class"
do
before
do
@note
=
create
:note
@note1
=
create
:note
...
...
@@ -142,22 +142,22 @@ describe IssuesHelper do
end
end
describe
"
#
awards_sort"
do
describe
"awards_sort"
do
it
"sorts a hash so thumbsup and thumbsdown are always on top"
do
data
=
{
"thumbsdown"
=>
"some value"
,
"lifter"
=>
"some value"
,
"thumbsup"
=>
"some value"
}
expect
(
awards_sort
(
data
).
keys
).
to
eq
([
"thumbsup"
,
"thumbsdown"
,
"lifter"
])
end
end
describe
"#milestone options"
do
let!
(
:closed_milestone
)
{
create
:closed_milestone
,
title:
"closed milestone"
,
project:
project
}
let!
(
:milestone1
)
{
create
:milestone
,
title:
"open milestone 1"
,
project:
project
}
let!
(
:milestone2
)
{
create
:milestone
,
title:
"open milestone 2"
,
project:
project
}
before
{
issue
.
update_attributes
(
milestone_id:
closed_milestone
.
id
)
}
describe
"milestone_options"
do
it
"gets closed milestone from current issue"
do
closed_milestone
=
create
(
:closed_milestone
,
project:
project
)
milestone1
=
create
(
:milestone
,
project:
project
)
milestone2
=
create
(
:milestone
,
project:
project
)
issue
.
update_attributes
(
milestone_id:
closed_milestone
.
id
)
options
=
milestone_options
(
issue
)
expect
(
options
).
to
have_selector
(
'option[selected]'
,
text:
closed_milestone
.
title
)
expect
(
options
).
to
have_selector
(
'option'
,
text:
milestone1
.
title
)
expect
(
options
).
to
have_selector
(
'option'
,
text:
milestone2
.
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