Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/projects/issues')
-rw-r--r--spec/views/projects/issues/_related_branches.html.haml_spec.rb2
-rw-r--r--spec/views/projects/issues/import_csv/_button.html.haml_spec.rb2
-rw-r--r--spec/views/projects/issues/show.html.haml_spec.rb12
3 files changed, 12 insertions, 4 deletions
diff --git a/spec/views/projects/issues/_related_branches.html.haml_spec.rb b/spec/views/projects/issues/_related_branches.html.haml_spec.rb
index 6c9bbaea38c..ba6f7068024 100644
--- a/spec/views/projects/issues/_related_branches.html.haml_spec.rb
+++ b/spec/views/projects/issues/_related_branches.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'projects/issues/_related_branches' do
+RSpec.describe 'projects/issues/_related_branches' do
include Devise::Test::ControllerHelpers
let(:pipeline) { build(:ci_pipeline, :success) }
diff --git a/spec/views/projects/issues/import_csv/_button.html.haml_spec.rb b/spec/views/projects/issues/import_csv/_button.html.haml_spec.rb
index 440edd376e0..8bc0a00d71c 100644
--- a/spec/views/projects/issues/import_csv/_button.html.haml_spec.rb
+++ b/spec/views/projects/issues/import_csv/_button.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'projects/issues/import_csv/_button' do
+RSpec.describe 'projects/issues/import_csv/_button' do
include Devise::Test::ControllerHelpers
context 'when the user does not have edit permissions' do
diff --git a/spec/views/projects/issues/show.html.haml_spec.rb b/spec/views/projects/issues/show.html.haml_spec.rb
index 60a541916e9..b2d208f038a 100644
--- a/spec/views/projects/issues/show.html.haml_spec.rb
+++ b/spec/views/projects/issues/show.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'projects/issues/show' do
+RSpec.describe 'projects/issues/show' do
include_context 'project show action'
context 'when the issue is closed' do
@@ -23,7 +23,7 @@ describe 'projects/issues/show' do
project.add_developer(user)
end
- it 'shows "Closed (moved)" if an issue has been moved' do
+ it 'shows "Closed (moved)" if an issue has been moved and closed' do
render
expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed (moved)')
@@ -41,6 +41,14 @@ describe 'projects/issues/show' do
expect(rendered).to have_selector("a[href=\"#{issue_path(new_issue)}\"]", text: 'moved')
end
+
+ it 'does not show "closed (moved)" if an issue has been moved and reopened (not closed)' do
+ allow(issue).to receive(:closed?).and_return(false)
+
+ render
+
+ expect(rendered).not_to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed (moved)')
+ end
end
context 'when user cannot see moved issue' do