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
2ef2d97a
Commit
2ef2d97a
authored
Jan 27, 2017
by
Rémy Coutable
Committed by
DJ Mountney
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'rs-issue-27350' into 'master'
Fix a transient failure in the `Explore::ProjectsController` spec Closes #27350 See merge request !8847
parent
440b31ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
projects_controller_spec.rb
spec/controllers/explore/projects_controller_spec.rb
+11
-14
No files found.
spec/controllers/explore/projects_controller_spec.rb
View file @
2ef2d97a
require
'spec_helper'
require
'spec_helper'
describe
Explore
::
ProjectsController
do
describe
Explore
::
ProjectsController
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:visibility
)
{
:public
}
describe
'GET #trending'
do
describe
'GET #trending'
do
let!
(
:project_1
)
{
create
(
:project
,
visibility
,
ci_id:
1
)
}
context
'sorting by update date'
do
let!
(
:project_2
)
{
create
(
:project
,
visibility
,
ci_id:
2
)
}
let
(
:project1
)
{
create
(
:empty_project
,
:public
,
updated_at:
3
.
days
.
ago
)
}
let
(
:project2
)
{
create
(
:empty_project
,
:public
,
updated_at:
1
.
day
.
ago
)
}
let!
(
:trending_project_1
)
{
create
(
:trending_project
,
project:
project_1
)
}
let!
(
:trending_project_2
)
{
create
(
:trending_project
,
project:
project_2
)
}
before
do
before
do
sign_in
(
user
)
create
(
:trending_project
,
project:
project1
)
end
create
(
:trending_project
,
project:
project2
)
end
context
'sorting by update date'
do
it
'sorts by last updated'
do
it
'sorts by last updated'
do
get
:trending
,
sort:
'updated_desc'
get
:trending
,
sort:
'updated_desc'
expect
(
assigns
(
:projects
)).
to
eq
[
project_2
,
project_1
]
expect
(
assigns
(
:projects
)).
to
eq
[
project2
,
project1
]
end
end
it
'sorts by oldest updated'
do
it
'sorts by oldest updated'
do
get
:trending
,
sort:
'updated_asc'
get
:trending
,
sort:
'updated_asc'
expect
(
assigns
(
:projects
)).
to
eq
[
project_1
,
project_2
]
expect
(
assigns
(
:projects
)).
to
eq
[
project1
,
project2
]
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