summaryrefslogtreecommitdiff
path: root/spec/features/protected_branches_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r--spec/features/protected_branches_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb
index 4278efc5a8f..389a51a10e0 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -38,6 +38,17 @@ RSpec.describe 'Protected Branches', :js do
sign_in(user)
end
+ it 'allows to create a protected branch with name containing HTML tags' do
+ visit project_protected_branches_path(project)
+ set_defaults
+ set_protected_branch_name('foo<b>bar<\b>')
+ click_on "Protect"
+
+ within(".protected-branches-list") { expect(page).to have_content('foo<b>bar<\b>') }
+ expect(ProtectedBranch.count).to eq(1)
+ expect(ProtectedBranch.last.name).to eq('foo<b>bar<\b>')
+ end
+
describe 'Delete protected branch' do
before do
create(:protected_branch, project: project, name: 'fix')