summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 14:18:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 14:18:51 +0000
commitbdbded586beb38e2ee4642c6a1e78ccbebc094dc (patch)
treeb4ed16e070e6fc4ff99fcb353bc1af1ae0d066bd /spec/views
parent80f61b4035607d7cd87de993b8f5e996bde3481f (diff)
downloadgitlab-ce-bdbded586beb38e2ee4642c6a1e78ccbebc094dc.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/issues/show.html.haml_spec.rb23
1 files changed, 22 insertions, 1 deletions
diff --git a/spec/views/projects/issues/show.html.haml_spec.rb b/spec/views/projects/issues/show.html.haml_spec.rb
index d734d0b4a20..d34b1735445 100644
--- a/spec/views/projects/issues/show.html.haml_spec.rb
+++ b/spec/views/projects/issues/show.html.haml_spec.rb
@@ -40,6 +40,13 @@ describe 'projects/issues/show' do
expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed (moved)')
end
+ it 'shows "Closed (moved)" if an issue has been moved and discussion is locked' do
+ allow(issue).to receive(:discussion_locked).and_return(true)
+ render
+
+ expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed (moved)')
+ end
+
it 'links "moved" to the new issue the original issue was moved to' do
render
@@ -95,12 +102,19 @@ describe 'projects/issues/show' do
expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed')
end
+
+ it 'shows "Closed" if discussion is locked' do
+ allow(issue).to receive(:discussion_locked).and_return(true)
+ render
+
+ expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed')
+ end
end
context 'when the issue is open' do
before do
allow(issue).to receive(:closed?).and_return(false)
- allow(issue).to receive(:disscussion_locked).and_return(false)
+ allow(issue).to receive(:discussion_locked).and_return(false)
end
it 'shows "Open" if an issue has been moved' do
@@ -108,5 +122,12 @@ describe 'projects/issues/show' do
expect(rendered).to have_selector('.status-box-open:not(.hidden)', text: 'Open')
end
+
+ it 'shows "Open" if discussion is locked' do
+ allow(issue).to receive(:discussion_locked).and_return(true)
+ render
+
+ expect(rendered).to have_selector('.status-box-open:not(.hidden)', text: 'Open')
+ end
end
end