diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-09-18 08:18:00 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-18 08:18:00 +0000 |
commit | 85ca8931de2d59920f2804771db4ac6a6e44a73c (patch) | |
tree | 8754a7a6b17f0012bafef0c3d379f41a22f35a42 /spec/services | |
parent | 97664956277cc2433887062afabc9b35c779c414 (diff) | |
parent | 50a62b479e354efce5d85dd46bc25033cfd066f3 (diff) | |
download | gitlab-ce-85ca8931de2d59920f2804771db4ac6a6e44a73c.tar.gz |
Merge branch '45754-open-issues-from-archived-project-listed-in-group-issue-board' into 'master'
Resolve "Open issues from archived project listed in group issue board"
Closes #45754
See merge request gitlab-org/gitlab-ce!21721
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/boards/issues/list_service_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index 27a7bf0e605..010679b5360 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -24,7 +24,7 @@ describe Boards::Issues::ListService do let!(:opened_issue1) { create(:labeled_issue, project: project, milestone: m1, title: 'Issue 1', labels: [bug]) } let!(:opened_issue2) { create(:labeled_issue, project: project, milestone: m2, title: 'Issue 2', labels: [p2]) } - let!(:reopened_issue1) { create(:issue, :opened, project: project, title: 'Issue 3' ) } + let!(:reopened_issue1) { create(:issue, :opened, project: project, title: 'Reopened Issue 1' ) } let!(:list1_issue1) { create(:labeled_issue, project: project, milestone: m1, labels: [p2, development]) } let!(:list1_issue2) { create(:labeled_issue, project: project, milestone: m2, labels: [development]) } @@ -44,12 +44,19 @@ describe Boards::Issues::ListService do end it_behaves_like 'issues list service' + + context 'when project is archived' do + let(:project) { create(:project, :archived) } + + it_behaves_like 'issues list service' + end end context 'when parent is a group' do let(:user) { create(:user) } let(:project) { create(:project, :empty_repo, namespace: group) } let(:project1) { create(:project, :empty_repo, namespace: group) } + let(:project_archived) { create(:project, :empty_repo, :archived, namespace: group) } let(:m1) { create(:milestone, group: group) } let(:m2) { create(:milestone, group: group) } @@ -77,7 +84,8 @@ describe Boards::Issues::ListService do let!(:opened_issue1) { create(:labeled_issue, project: project, milestone: m1, title: 'Issue 1', labels: [bug]) } let!(:opened_issue2) { create(:labeled_issue, project: project, milestone: m2, title: 'Issue 2', labels: [p2, p2_project]) } - let!(:reopened_issue1) { create(:issue, state: 'opened', project: project, title: 'Issue 3', closed_at: Time.now ) } + let!(:opened_issue3) { create(:labeled_issue, project: project_archived, milestone: m1, title: 'Issue 3', labels: [bug]) } + let!(:reopened_issue1) { create(:issue, state: 'opened', project: project, title: 'Reopened Issue 1', closed_at: Time.now ) } let!(:list1_issue1) { create(:labeled_issue, project: project, milestone: m1, labels: [p2, p2_project, development]) } let!(:list1_issue2) { create(:labeled_issue, project: project, milestone: m2, labels: [development]) } |