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
Boxiang Sun
gitlab-ce
Commits
9a07bc81
Commit
9a07bc81
authored
Mar 01, 2017
by
Alexis Reigel
Committed by
Alexis Reigel
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add misssing scope specs
parent
15492398
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+19
-0
No files found.
spec/models/ci/runner_spec.rb
View file @
9a07bc81
...
@@ -49,6 +49,25 @@ describe Ci::Runner do
...
@@ -49,6 +49,25 @@ describe Ci::Runner do
end
end
end
end
describe
'scopes'
do
describe
'owned_or_shared'
do
it
'returns the specific project runner'
do
specific_project
=
create
:project
other_project
=
create
:project
specific_runner
=
create
:ci_runner
,
:specific
,
projects:
[
specific_project
]
other_runner
=
create
:ci_runner
,
:specific
,
projects:
[
other_project
]
expect
(
described_class
.
owned_or_shared
(
specific_project
.
id
)).
to
eq
[
specific_runner
]
end
it
'returns the shared projects'
do
runner
=
create
:ci_runner
,
:shared
expect
(
described_class
.
owned_or_shared
(
0
)).
to
eq
[
runner
]
end
end
end
describe
'#display_name'
do
describe
'#display_name'
do
it
'returns the description if it has a value'
do
it
'returns the description if it has a value'
do
runner
=
FactoryBot
.
build
(
:ci_runner
,
description:
'Linux/Ruby-1.9.3-p448'
)
runner
=
FactoryBot
.
build
(
:ci_runner
,
description:
'Linux/Ruby-1.9.3-p448'
)
...
...
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