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
0c2962eb
Commit
0c2962eb
authored
Jun 02, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use subject for more consistent testing style:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194489
parent
5360ef2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
user_spec.rb
spec/models/user_spec.rb
+5
-4
No files found.
spec/models/user_spec.rb
View file @
0c2962eb
...
...
@@ -848,6 +848,7 @@ describe User, models: true do
describe
'#ci_authorized_runners'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:runner
)
{
create
(
:ci_runner
)
}
subject
{
user
.
ci_authorized_runners
}
before
{
project
.
runners
<<
runner
}
...
...
@@ -855,7 +856,7 @@ describe User, models: true do
let
(
:project
)
{
create
(
:project
)
}
it
'does not load'
do
expect
(
user
.
ci_authorized_runners
)
.
to
eq
([])
is_expected
.
to
eq
([])
end
end
...
...
@@ -864,19 +865,19 @@ describe User, models: true do
let
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
it
'loads'
do
expect
(
user
.
ci_authorized_runners
)
.
to
eq
([
runner
])
is_expected
.
to
eq
([
runner
])
end
end
shared_examples
:member
do
it
'loads when the user is a master'
do
add_user
(
Gitlab
::
Access
::
MASTER
)
expect
(
user
.
ci_authorized_runners
)
.
to
eq
([
runner
])
is_expected
.
to
eq
([
runner
])
end
it
'does not load when the user is a developer'
do
add_user
(
Gitlab
::
Access
::
DEVELOPER
)
expect
(
user
.
ci_authorized_runners
)
.
to
eq
([])
is_expected
.
to
eq
([])
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