Don't list merge requests from archived projects in Group view.
This commit is contained in:
parent
0b86b46a2c
commit
b41a274b62
3 changed files with 21 additions and 1 deletions
|
@ -2,7 +2,7 @@ module MergeRequestsAction
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
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.preload(:author, :target_project)
|
||||
|
||||
|
|
|
@ -33,6 +33,12 @@ Feature: Groups
|
|||
When I visit group "Owned" merge requests page
|
||||
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
|
||||
When I visit group "Owned" settings page
|
||||
And I change group "Owned" name to "new-name"
|
||||
|
|
|
@ -50,6 +50,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
|
|||
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
|
||||
assigned_to_me(:merge_requests).each do |issue|
|
||||
expect(page).to have_content issue.title[0..80]
|
||||
|
@ -137,6 +143,14 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
|
|||
author: current_user
|
||||
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
|
||||
|
||||
def assigned_to_me(key)
|
||||
|
|
Loading…
Reference in a new issue