Commit ffa44560 authored by Abdul Wadood's avatar Abdul Wadood

Disable Rails/SaveBang cop for subscriptions_controller_spec.rb

As it results in active record validation failure.
parent c904db1a
......@@ -237,7 +237,7 @@ RSpec.describe SubscriptionsController do
let(:group) { Group.new(path: 'foo') }
it 'returns the errors in json format' do
group.save!
group.save # rubocop:disable Rails/SaveBang
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!
group.save # rubocop:disable Rails/SaveBang
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