summaryrefslogtreecommitdiff
path: root/spec/features/projects/issues
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/issues')
-rw-r--r--spec/features/projects/issues/user_views_issue_spec.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/features/projects/issues/user_views_issue_spec.rb b/spec/features/projects/issues/user_views_issue_spec.rb
index f7f2cde3d64..d17ce636f3b 100644
--- a/spec/features/projects/issues/user_views_issue_spec.rb
+++ b/spec/features/projects/issues/user_views_issue_spec.rb
@@ -6,11 +6,27 @@ describe "User views issue" do
set(:issue) { create(:issue, project: project, description: "# Description header", author: user) }
before do
- project.add_guest(user)
+ project.add_developer(user)
sign_in(user)
visit(project_issue_path(project, issue))
end
it { expect(page).to have_header_with_correct_id_and_link(1, "Description header", "description-header") }
+
+ it { expect(page).to have_link('New issue') }
+
+ it { expect(page).to have_button('Create merge request') }
+
+ it { expect(page).to have_link('Close issue') }
+
+ context 'when the project is archived' do
+ let(:project) { create(:project, :public, archived: true) }
+
+ it { expect(page).not_to have_link('New issue') }
+
+ it { expect(page).not_to have_button('Create merge request') }
+
+ it { expect(page).not_to have_link('Close issue') }
+ end
end