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
5fb6c517
Commit
5fb6c517
authored
Jan 21, 2020
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust specs per review
parent
42e11aa6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/lib/api/helpers_spec.rb
spec/lib/api/helpers_spec.rb
+5
-5
No files found.
spec/lib/api/helpers_spec.rb
View file @
5fb6c517
...
@@ -190,7 +190,7 @@ describe API::Helpers do
...
@@ -190,7 +190,7 @@ describe API::Helpers do
end
end
describe
'#order_options_with_tie_breaker'
do
describe
'#order_options_with_tie_breaker'
do
let
(
:subject
)
{
Class
.
new
.
include
(
described_class
).
new
.
order_options_with_tie_breaker
}
subject
{
Class
.
new
.
include
(
described_class
).
new
.
order_options_with_tie_breaker
}
before
do
before
do
allow_any_instance_of
(
described_class
).
to
receive
(
:params
).
and_return
(
params
)
allow_any_instance_of
(
described_class
).
to
receive
(
:params
).
and_return
(
params
)
...
@@ -201,7 +201,7 @@ describe API::Helpers do
...
@@ -201,7 +201,7 @@ describe API::Helpers do
let
(
:params
)
{
{
order_by:
'name'
,
sort:
'asc'
}
}
let
(
:params
)
{
{
order_by:
'name'
,
sort:
'asc'
}
}
it
'adds id based ordering with same direction as primary order'
do
it
'adds id based ordering with same direction as primary order'
do
expect
(
subject
)
.
to
eq
({
'name'
=>
'asc'
,
'id'
=>
'asc'
})
is_expected
.
to
eq
({
'name'
=>
'asc'
,
'id'
=>
'asc'
})
end
end
end
end
...
@@ -209,7 +209,7 @@ describe API::Helpers do
...
@@ -209,7 +209,7 @@ describe API::Helpers do
let
(
:params
)
{
{
order_by:
'name'
,
sort:
'desc'
}
}
let
(
:params
)
{
{
order_by:
'name'
,
sort:
'desc'
}
}
it
'adds id based ordering with same direction as primary order'
do
it
'adds id based ordering with same direction as primary order'
do
expect
(
subject
)
.
to
eq
({
'name'
=>
'desc'
,
'id'
=>
'desc'
})
is_expected
.
to
eq
({
'name'
=>
'desc'
,
'id'
=>
'desc'
})
end
end
end
end
end
end
...
@@ -218,7 +218,7 @@ describe API::Helpers do
...
@@ -218,7 +218,7 @@ describe API::Helpers do
let
(
:params
)
{
{
order_by:
'name'
}
}
let
(
:params
)
{
{
order_by:
'name'
}
}
it
'adds ID ASC order'
do
it
'adds ID ASC order'
do
expect
(
subject
)
.
to
eq
({
'name'
=>
nil
,
'id'
=>
'asc'
})
is_expected
.
to
eq
({
'name'
=>
nil
,
'id'
=>
'asc'
})
end
end
end
end
...
@@ -226,7 +226,7 @@ describe API::Helpers do
...
@@ -226,7 +226,7 @@ describe API::Helpers do
let
(
:params
)
{
{
order_by:
'id'
,
sort:
'asc'
}
}
let
(
:params
)
{
{
order_by:
'id'
,
sort:
'asc'
}
}
it
'does not add an additional order'
do
it
'does not add an additional order'
do
expect
(
subject
)
.
to
eq
({
'id'
=>
'asc'
})
is_expected
.
to
eq
({
'id'
=>
'asc'
})
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