Commit c1cc3f96 authored by Furkan Ayhan's avatar Furkan Ayhan Committed by Abdul Wadood

Apply 2 suggestion(s) to 1 file(s)

parent cc6fd37d
......@@ -237,7 +237,7 @@ RSpec.describe SubscriptionsController do
let(:group) { Group.new(path: 'foo') }
it 'returns the errors in json format' do
group.save # rubocop:disable Rails/SaveBang
group.valid?
subject
expect(response.body).to include({ name: ["can't be blank"] }.to_json)
......@@ -247,7 +247,7 @@ RSpec.describe SubscriptionsController do
let(:group) { Group.new(path: 'foo', name: '<script>alert("attack")</script>') }
it 'returns the errors in json format' do
group.save # rubocop:disable Rails/SaveBang
group.valid?
subject
expect(Gitlab::Json.parse(response.body)['name']).to match_array([Gitlab::Regex.group_name_regex_message, HtmlSafetyValidator.error_message])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment