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/features/groups/labels/edit_spec.rb')
-rw-r--r--spec/features/groups/labels/edit_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/groups/labels/edit_spec.rb b/spec/features/groups/labels/edit_spec.rb
index 2be7f61eeb9..8e6560af352 100644
--- a/spec/features/groups/labels/edit_spec.rb
+++ b/spec/features/groups/labels/edit_spec.rb
@@ -3,6 +3,8 @@
require 'spec_helper'
RSpec.describe 'Edit group label' do
+ include Spec::Support::Helpers::ModalHelpers
+
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:label) { create(:group_label, group: group) }
@@ -20,4 +22,16 @@ RSpec.describe 'Edit group label' do
expect(current_path).to eq(root_path)
expect(label.reload.title).to eq('new label name')
end
+
+ it 'allows user to delete label', :js do
+ click_button 'Delete'
+
+ within_modal do
+ expect(page).to have_content("#{label.title} will be permanently deleted from #{group.name}. This cannot be undone.")
+
+ click_link 'Delete label'
+ end
+
+ expect(page).to have_content("#{label.title} deleted permanently")
+ end
end