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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2894f293
Commit
2894f293
authored
Mar 15, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use eq instead of match_array for comparison of array
parent
d1ca5f46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/finders/pipelines_finder_spec.rb
spec/finders/pipelines_finder_spec.rb
+5
-5
No files found.
spec/finders/pipelines_finder_spec.rb
View file @
2894f293
...
@@ -28,7 +28,7 @@ describe PipelinesFinder do
...
@@ -28,7 +28,7 @@ describe PipelinesFinder do
end
end
it
'orders in descending order on ID'
do
it
'orders in descending order on ID'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
order
(
id: :desc
))
expect
(
subject
).
to
eq
(
Ci
::
Pipeline
.
order
(
id: :desc
))
end
end
end
end
...
@@ -209,7 +209,7 @@ describe PipelinesFinder do
...
@@ -209,7 +209,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'asc'
}
}
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'asc'
}
}
it
'sorts by created_at asc'
do
it
'sorts by created_at asc'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
order
(
created_at: :asc
))
expect
(
subject
).
to
eq
(
Ci
::
Pipeline
.
order
(
created_at: :asc
))
end
end
end
end
...
@@ -217,7 +217,7 @@ describe PipelinesFinder do
...
@@ -217,7 +217,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'desc'
}
}
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'desc'
}
}
it
'sorts by created_at desc'
do
it
'sorts by created_at desc'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
order
(
created_at: :desc
))
expect
(
subject
).
to
eq
(
Ci
::
Pipeline
.
order
(
created_at: :desc
))
end
end
end
end
...
@@ -225,7 +225,7 @@ describe PipelinesFinder do
...
@@ -225,7 +225,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
order_by:
'invalid_column'
,
sort:
'desc'
}
}
let
(
:params
)
{
{
order_by:
'invalid_column'
,
sort:
'desc'
}
}
it
'sorts by default'
do
it
'sorts by default'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
order
(
id: :desc
))
expect
(
subject
).
to
eq
(
Ci
::
Pipeline
.
order
(
id: :desc
))
end
end
end
end
...
@@ -233,7 +233,7 @@ describe PipelinesFinder do
...
@@ -233,7 +233,7 @@ describe PipelinesFinder do
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'invalid_sort'
}
}
let
(
:params
)
{
{
order_by:
'created_at'
,
sort:
'invalid_sort'
}
}
it
'sorts by default'
do
it
'sorts by default'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
order
(
id: :desc
))
expect
(
subject
).
to
eq
(
Ci
::
Pipeline
.
order
(
id: :desc
))
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