diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2018-03-17 11:29:05 +0300 |
---|---|---|
committer | Semyon Pupkov <mail@semyonpupkov.com> | 2018-03-29 10:12:47 +0300 |
commit | d6af33b4b2c90a7b4d3b9255df2c633af74e057f (patch) | |
tree | b22934369b21eeeda87abeb0dd95c62d9cd60a80 /spec/features/groups/issues_spec.rb | |
parent | 2c792c7572502807508add213be70db1b81685d4 (diff) |
Replace group spinach tests with RSpec analog
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
Diffstat (limited to 'spec/features/groups/issues_spec.rb')
-rw-r--r-- | spec/features/groups/issues_spec.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index 450bc0ff8cf..90bf7ba49f6 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -3,8 +3,11 @@ require 'spec_helper' feature 'Group issues page' do include FilteredSearchHelpers + let(:group) { create(:group) } + let(:project) { create(:project, :public, group: group)} + let(:path) { issues_group_path(group) } + context 'with shared examples' do - let(:path) { issues_group_path(group) } let(:issuable) { create(:issue, project: project, title: "this is my created issuable")} include_examples 'project features apply to issuables', Issue @@ -31,7 +34,6 @@ feature 'Group issues page' do let(:access_level) { ProjectFeature::ENABLED } let(:user) { user_in_group } let(:user2) { user_outside_group } - let(:path) { issues_group_path(group) } it 'filters by only group users' do filtered_search.set('assignee:') @@ -43,9 +45,7 @@ feature 'Group issues page' do end context 'issues list', :nested_groups do - let(:group) { create(:group)} let(:subgroup) { create(:group, parent: group) } - let(:project) { create(:project, :public, group: group)} let(:subgroup_project) { create(:project, :public, group: subgroup)} let!(:issue) { create(:issue, project: project, title: 'root group issue') } let!(:subgroup_issue) { create(:issue, project: subgroup_project, title: 'subgroup issue') } @@ -59,5 +59,17 @@ feature 'Group issues page' do expect(page).to have_content('subgroup issue') end end + + context 'when project is archived' do + before do + project.archive! + end + + it 'does not render issue' do + visit path + + expect(page).not_to have_content issue.title[0..80] + end + end end end |