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
0c354dfd
Commit
0c354dfd
authored
Jan 04, 2021
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project ordering sorted by name by default
parent
e049419a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
spec/controllers/dashboard/projects_controller_spec.rb
spec/controllers/dashboard/projects_controller_spec.rb
+3
-6
No files found.
spec/controllers/dashboard/projects_controller_spec.rb
View file @
0c354dfd
...
@@ -13,8 +13,8 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
...
@@ -13,8 +13,8 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
end
end
context
'user logged in'
do
context
'user logged in'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
,
name:
'Project 1'
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
,
name:
'Project Two'
)
}
let
(
:projects
)
{
[
project
,
project2
]
}
let
(
:projects
)
{
[
project
,
project2
]
}
before_all
do
before_all
do
...
@@ -36,10 +36,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
...
@@ -36,10 +36,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
end
end
end
end
it
'orders the projects by last activity by default'
do
it
'orders the projects by name by default'
do
project
.
update!
(
last_repository_updated_at:
3
.
days
.
ago
,
last_activity_at:
3
.
days
.
ago
)
project2
.
update!
(
last_repository_updated_at:
10
.
days
.
ago
,
last_activity_at:
10
.
days
.
ago
)
get
:index
get
:index
expect
(
assigns
(
:projects
)).
to
eq
(
projects
)
expect
(
assigns
(
:projects
)).
to
eq
(
projects
)
...
...
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