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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b41a274b
Commit
b41a274b
authored
Feb 25, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't list merge requests from archived projects in Group view.
parent
0b86b46a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
app/controllers/concerns/merge_requests_action.rb
app/controllers/concerns/merge_requests_action.rb
+1
-1
features/groups.feature
features/groups.feature
+6
-0
features/steps/groups.rb
features/steps/groups.rb
+14
-0
No files found.
app/controllers/concerns/merge_requests_action.rb
View file @
b41a274b
...
@@ -2,7 +2,7 @@ module MergeRequestsAction
...
@@ -2,7 +2,7 @@ module MergeRequestsAction
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
def
merge_requests
def
merge_requests
@merge_requests
=
get_merge_requests_collection
@merge_requests
=
get_merge_requests_collection
.
non_archived
@merge_requests
=
@merge_requests
.
page
(
params
[
:page
]).
per
(
ApplicationController
::
PER_PAGE
)
@merge_requests
=
@merge_requests
.
page
(
params
[
:page
]).
per
(
ApplicationController
::
PER_PAGE
)
@merge_requests
=
@merge_requests
.
preload
(
:author
,
:target_project
)
@merge_requests
=
@merge_requests
.
preload
(
:author
,
:target_project
)
...
...
features/groups.feature
View file @
b41a274b
...
@@ -33,6 +33,12 @@ Feature: Groups
...
@@ -33,6 +33,12 @@ Feature: Groups
When
I visit group
"Owned"
merge requests page
When
I visit group
"Owned"
merge requests page
Then
I should see merge requests from group
"Owned"
assigned to me
Then
I should see merge requests from group
"Owned"
assigned to me
Scenario
:
I
should not see merge requests from archived project in
"Owned"
group merge requests list
Given
Group
"Owned"
has archived project
And
the archived project have some merge_requests
When
I visit group
"Owned"
merge requests page
Then
I should not see merge requests from the archived project
Scenario
:
I
should see edit group
"Owned"
page
Scenario
:
I
should see edit group
"Owned"
page
When
I visit group
"Owned"
settings page
When
I visit group
"Owned"
settings page
And
I change group
"Owned"
name to
"new-name"
And
I change group
"Owned"
name to
"new-name"
...
...
features/steps/groups.rb
View file @
b41a274b
...
@@ -50,6 +50,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
...
@@ -50,6 +50,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
end
end
end
step
'I should not see merge requests from the archived project'
do
@archived_project
.
merge_requests
.
each
do
|
mr
|
expect
(
page
).
not_to
have_content
mr
.
title
end
end
step
'I should see merge requests from group "Owned" assigned to me'
do
step
'I should see merge requests from group "Owned" assigned to me'
do
assigned_to_me
(
:merge_requests
).
each
do
|
issue
|
assigned_to_me
(
:merge_requests
).
each
do
|
issue
|
expect
(
page
).
to
have_content
issue
.
title
[
0
..
80
]
expect
(
page
).
to
have_content
issue
.
title
[
0
..
80
]
...
@@ -137,6 +143,14 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
...
@@ -137,6 +143,14 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
author:
current_user
author:
current_user
end
end
step
'the archived project have some merge requests'
do
create
:merge_request
,
source_project:
@archived_project
,
target_project:
@archived_project
,
assignee:
current_user
,
author:
current_user
end
private
private
def
assigned_to_me
(
key
)
def
assigned_to_me
(
key
)
...
...
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