summaryrefslogtreecommitdiff
path: root/spec/features/issues_spec.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-09-27 10:23:15 -0500
committerMike Greiling <mike@pixelcog.com>2016-09-27 10:23:15 -0500
commitb13213e6be86c7aaf3005a79836d62049a3e5820 (patch)
tree96d7960bf9a5a6cce8d1541d93bfeeec5c1de29e /spec/features/issues_spec.rb
parent3820ca5876ecb550d4d7eba0db98296f467125d8 (diff)
downloadgitlab-ce-b13213e6be86c7aaf3005a79836d62049a3e5820.tar.gz
Send ajax request for label update only if they are changed (#19472 !5071)label-update-check-new
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r--spec/features/issues_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb
index 22359c8f938..9fe40ea0892 100644
--- a/spec/features/issues_spec.rb
+++ b/spec/features/issues_spec.rb
@@ -369,6 +369,24 @@ describe 'Issues', feature: true do
end
end
+ describe 'update labels from issue#show', js: true do
+ let(:issue) { create(:issue, project: project, author: @user, assignee: @user) }
+ let!(:label) { create(:label, project: project) }
+
+ before do
+ visit namespace_project_issue_path(project.namespace, project, issue)
+ end
+
+ it 'will not send ajax request when no data is changed' do
+ page.within '.labels' do
+ click_link 'Edit'
+ first('.dropdown-menu-close').click
+
+ expect(page).not_to have_selector('.block-loading')
+ end
+ end
+ end
+
describe 'update assignee from issue#show' do
let(:issue) { create(:issue, project: project, author: @user, assignee: @user) }