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
2ca32a09
Commit
2ca32a09
authored
Jun 03, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for the case when user can't prioritize labels
parent
a966e6e4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
update_prioritization_spec.rb
spec/features/projects/labels/update_prioritization_spec.rb
+30
-0
No files found.
spec/features/projects/labels/update_prioritization_spec.rb
View file @
2ca32a09
...
...
@@ -3,6 +3,7 @@ require 'spec_helper'
feature
'Prioritize labels'
,
feature:
true
do
include
WaitForAjax
context
'when project belongs to user'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
...
...
@@ -75,4 +76,33 @@ feature 'Prioritize labels', feature: true do
expect
(
page
.
all
(
'li'
).
last
).
to
have_content
(
'bug'
)
end
end
end
context
'as a guest'
do
it
'can not prioritize labels'
do
user
=
create
(
:user
)
guest
=
create
(
:user
)
project
=
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
create
(
:label
,
title:
'bug'
)
login_as
guest
visit
namespace_project_labels_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_css
(
'.prioritized-labels'
)
end
end
context
'as a non signed in user'
do
it
'can not prioritize labels'
do
user
=
create
(
:user
)
project
=
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
create
(
:label
,
title:
'bug'
)
visit
namespace_project_labels_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_css
(
'.prioritized-labels'
)
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