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
8d5d6166
Commit
8d5d6166
authored
Mar 11, 2020
by
Thong Kuah
Committed by
Heinrich Lee Yu
Mar 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'fix-project-controller-event-feed' into 'master'"
This reverts merge request !19524
parent
0a136b97
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
56 deletions
+5
-56
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+3
-2
changelogs/unreleased/fix-missing-rss-feed-events.yml
changelogs/unreleased/fix-missing-rss-feed-events.yml
+0
-5
spec/controllers/dashboard/projects_controller_spec.rb
spec/controllers/dashboard/projects_controller_spec.rb
+2
-49
No files found.
app/controllers/dashboard/projects_controller.rb
View file @
8d5d6166
...
...
@@ -33,7 +33,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def
starred
@projects
=
load_projects
(
params
.
merge
(
starred:
true
))
.
includes
(
:forked_from_project
,
:tags
)
.
page
(
params
[
:page
])
.
includes
(
:forked_from_project
,
:tags
)
@groups
=
[]
...
...
@@ -51,7 +51,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
private
def
projects
@projects
||=
load_projects
(
params
.
merge
(
non_public:
true
))
.
page
(
params
[
:page
])
@projects
||=
load_projects
(
params
.
merge
(
non_public:
true
))
end
def
render_projects
...
...
@@ -73,6 +73,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
.
execute
.
includes
(
:route
,
:creator
,
:group
,
namespace:
[
:route
,
:owner
])
.
preload
(
:project_feature
)
.
page
(
finder_params
[
:page
])
prepare_projects_for_rendering
(
projects
)
end
...
...
changelogs/unreleased/fix-missing-rss-feed-events.yml
deleted
100644 → 0
View file @
0a136b97
---
title
:
Fix missing RSS feed events
merge_request
:
19524
author
:
type
:
fixed
spec/controllers/dashboard/projects_controller_spec.rb
View file @
8d5d6166
...
...
@@ -86,58 +86,11 @@ describe Dashboard::ProjectsController do
end
describe
'GET /starred.json'
do
subject
{
get
:starred
,
format: :json
}
let
(
:projects
)
{
create_list
(
:project
,
2
,
creator:
user
)
}
before
do
allow
(
Kaminari
.
config
).
to
receive
(
:default_per_page
).
and_return
(
1
)
projects
.
each
do
|
project
|
project
.
add_developer
(
user
)
create
(
:users_star_project
,
project_id:
project
.
id
,
user_id:
user
.
id
)
end
end
it
'returns success'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
end
it
'paginates the records'
do
subject
expect
(
assigns
(
:projects
).
count
).
to
eq
(
1
)
end
end
end
context
'atom requests'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
end
describe
'#index'
do
context
'project pagination'
do
let
(
:projects
)
{
create_list
(
:project
,
2
,
creator:
user
)
}
before
do
allow
(
Kaminari
.
config
).
to
receive
(
:default_per_page
).
and_return
(
1
)
projects
.
each
do
|
project
|
project
.
add_developer
(
user
)
end
get
:starred
,
format: :json
end
it
'does not paginate projects, even if page number is passed'
do
get
:index
,
format: :atom
expect
(
assigns
(
:events
).
count
).
to
eq
(
2
)
end
end
it
{
is_expected
.
to
respond_with
(
:success
)
}
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