DEV: Apply syntax_tree formatting to spec/*

This commit is contained in:
David Taylor
2023-01-09 11:18:21 +00:00
parent 0cf6421716
commit cb932d6ee1
907 changed files with 58693 additions and 45909 deletions

View File

@@ -2,16 +2,16 @@
RSpec.describe UserField do
describe "doesn't validate presence of name if field type is 'confirm'" do
subject { described_class.new(field_type: 'confirm') }
subject { described_class.new(field_type: "confirm") }
it { is_expected.not_to validate_presence_of :name }
end
describe "validates presence of name for other field types" do
subject { described_class.new(field_type: 'dropdown') }
subject { described_class.new(field_type: "dropdown") }
it { is_expected.to validate_presence_of :name }
end
it 'sanitizes the description' do
it "sanitizes the description" do
xss = "<b onmouseover=alert('Wufff!')>click me!</b><script>alert('TEST');</script>"
user_field = Fabricate(:user_field)
@@ -20,7 +20,7 @@ RSpec.describe UserField do
expect(user_field.description).to eq("<b>click me!</b>alert('TEST');")
end
it 'allows target attribute in the description' do
it "allows target attribute in the description" do
link = "<a target=\"_blank\" href=\"/elsewhere\">elsewhere</a>"
user_field = Fabricate(:user_field)