diff options
Diffstat (limited to 'spec/models/namespace_setting_spec.rb')
-rw-r--r-- | spec/models/namespace_setting_spec.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/models/namespace_setting_spec.rb b/spec/models/namespace_setting_spec.rb index e8ed6f1a460..c1cc8fc3e88 100644 --- a/spec/models/namespace_setting_spec.rb +++ b/spec/models/namespace_setting_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe NamespaceSetting, type: :model do + it_behaves_like 'sanitizable', :namespace_settings, %i[default_branch_name] + # Relationships # describe "Associations" do @@ -41,14 +43,6 @@ RSpec.describe NamespaceSetting, type: :model do it_behaves_like "doesn't return an error" end - - context "when it contains javascript tags" do - it "gets sanitized properly" do - namespace_settings.update!(default_branch_name: "hello<script>alert(1)</script>") - - expect(namespace_settings.default_branch_name).to eq('hello') - end - end end describe '#allow_mfa_for_group' do |