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
Jérome Perrin
gitlab-ce
Commits
40e89401
Commit
40e89401
authored
Mar 07, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include to all(eq()). Test status, not scope.
parent
d33e7621
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
spec/finders/pipelines_finder_spec.rb
spec/finders/pipelines_finder_spec.rb
+16
-16
No files found.
spec/finders/pipelines_finder_spec.rb
View file @
40e89401
...
@@ -40,7 +40,7 @@ describe PipelinesFinder do
...
@@ -40,7 +40,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
scope:
'running'
}
}
let
(
:params
)
{
{
scope:
'running'
}
}
it
'has only running status'
do
it
'has only running status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'running'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'running'
)
)
end
end
end
end
...
@@ -48,7 +48,7 @@ describe PipelinesFinder do
...
@@ -48,7 +48,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
scope:
'pending'
}
}
let
(
:params
)
{
{
scope:
'pending'
}
}
it
'has only pending status'
do
it
'has only pending status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'pending'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'pending'
)
)
end
end
end
end
...
@@ -66,7 +66,7 @@ describe PipelinesFinder do
...
@@ -66,7 +66,7 @@ describe PipelinesFinder do
it
'excludes tags'
do
it
'excludes tags'
do
expect
(
subject
.
count
).
to
be
1
expect
(
subject
.
count
).
to
be
1
expect
(
subject
).
not_to
include
dummy_pipelines
[
:tag
]
expect
(
subject
).
not_to
include
dummy_pipelines
[
:tag
]
expect
(
subject
.
map
(
&
:ref
)).
to
include
(
'master'
)
expect
(
subject
.
map
(
&
:ref
)).
to
all
(
eq
(
'master'
)
)
end
end
end
end
...
@@ -76,57 +76,57 @@ describe PipelinesFinder do
...
@@ -76,57 +76,57 @@ describe PipelinesFinder do
it
'excludes branches'
do
it
'excludes branches'
do
expect
(
subject
.
count
).
to
be
1
expect
(
subject
.
count
).
to
be
1
expect
(
subject
).
to
include
dummy_pipelines
[
:tag
]
expect
(
subject
).
to
include
dummy_pipelines
[
:tag
]
expect
(
subject
.
map
(
&
:ref
)).
not_to
include
(
'master'
)
expect
(
subject
.
map
(
&
:ref
)).
not_to
all
(
eq
(
'master'
)
)
end
end
end
end
end
end
context
'when a status is passed'
do
context
'when a status is passed'
do
context
'when selecting running'
do
context
'when selecting running'
do
let
(
:params
)
{
{
s
cope
:
'running'
}
}
let
(
:params
)
{
{
s
tatus
:
'running'
}
}
it
'has only running status'
do
it
'has only running status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'running'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'running'
)
)
end
end
end
end
context
'when selecting pending'
do
context
'when selecting pending'
do
let
(
:params
)
{
{
s
cope
:
'pending'
}
}
let
(
:params
)
{
{
s
tatus
:
'pending'
}
}
it
'has only pending status'
do
it
'has only pending status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'pending'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'pending'
)
)
end
end
end
end
context
'when selecting success'
do
context
'when selecting success'
do
let
(
:params
)
{
{
s
cope
:
'success'
}
}
let
(
:params
)
{
{
s
tatus
:
'success'
}
}
it
'has only success status'
do
it
'has only success status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'success'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'success'
)
)
end
end
end
end
context
'when selecting failed'
do
context
'when selecting failed'
do
let
(
:params
)
{
{
s
cope
:
'failed'
}
}
let
(
:params
)
{
{
s
tatus
:
'failed'
}
}
it
'has only failed status'
do
it
'has only failed status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'failed'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'failed'
)
)
end
end
end
end
context
'when selecting canceled'
do
context
'when selecting canceled'
do
let
(
:params
)
{
{
s
cope
:
'canceled'
}
}
let
(
:params
)
{
{
s
tatus
:
'canceled'
}
}
it
'has only canceled status'
do
it
'has only canceled status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'canceled'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'canceled'
)
)
end
end
end
end
context
'when selecting skipped'
do
context
'when selecting skipped'
do
let
(
:params
)
{
{
s
cope
:
'skipped'
}
}
let
(
:params
)
{
{
s
tatus
:
'skipped'
}
}
it
'has only skipped status'
do
it
'has only skipped status'
do
expect
(
subject
.
map
(
&
:status
)).
to
include
(
'skipped'
)
expect
(
subject
.
map
(
&
:status
)).
to
all
(
eq
(
'skipped'
)
)
end
end
end
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