diff options
Diffstat (limited to 'spec/models/integrations')
-rw-r--r-- | spec/models/integrations/buildkite_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/integrations/campfire_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/integrations/jira_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/integrations/teamcity_spec.rb | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/spec/models/integrations/buildkite_spec.rb b/spec/models/integrations/buildkite_spec.rb index f3231d50eae..ce31c0b20a3 100644 --- a/spec/models/integrations/buildkite_spec.rb +++ b/spec/models/integrations/buildkite_spec.rb @@ -50,7 +50,7 @@ RSpec.describe Integrations::Buildkite, :use_clean_rails_memory_store_caching, f describe '.supported_events' do it 'supports push, merge_request, and tag_push events' do - expect(integration.supported_events).to eq %w(push merge_request tag_push) + expect(integration.supported_events).to eq %w[push merge_request tag_push] end end diff --git a/spec/models/integrations/campfire_spec.rb b/spec/models/integrations/campfire_spec.rb index 38d3d89cdbf..19f819252f8 100644 --- a/spec/models/integrations/campfire_spec.rb +++ b/spec/models/integrations/campfire_spec.rb @@ -48,7 +48,7 @@ RSpec.describe Integrations::Campfire, feature_category: :integrations do ) @sample_data = Gitlab::DataBuilder::Push.build_sample(project, user) @rooms_url = 'https://project-name.campfirenow.com/rooms.json' - @auth = %w(verySecret X) + @auth = %w[verySecret X] @headers = { 'Content-Type' => 'application/json; charset=utf-8' } end diff --git a/spec/models/integrations/jira_spec.rb b/spec/models/integrations/jira_spec.rb index c87128db221..d3ae92ea52a 100644 --- a/spec/models/integrations/jira_spec.rb +++ b/spec/models/integrations/jira_spec.rb @@ -719,10 +719,10 @@ RSpec.describe Integrations::Jira, feature_category: :integrations do allow_any_instance_of(JIRA::Resource::Issue).to receive(:key).and_return(issue_key) allow(JIRA::Resource::Remotelink).to receive(:all).and_return([]) - WebMock.stub_request(:get, issue_url).with(basic_auth: %w(jira-username jira-password)) - WebMock.stub_request(:post, transitions_url).with(basic_auth: %w(jira-username jira-password)) - WebMock.stub_request(:post, comment_url).with(basic_auth: %w(jira-username jira-password)) - WebMock.stub_request(:post, remote_link_url).with(basic_auth: %w(jira-username jira-password)) + WebMock.stub_request(:get, issue_url).with(basic_auth: %w[jira-username jira-password]) + WebMock.stub_request(:post, transitions_url).with(basic_auth: %w[jira-username jira-password]) + WebMock.stub_request(:post, comment_url).with(basic_auth: %w[jira-username jira-password]) + WebMock.stub_request(:post, remote_link_url).with(basic_auth: %w[jira-username jira-password]) end let(:external_issue) { ExternalIssue.new('JIRA-123', project) } @@ -864,7 +864,7 @@ RSpec.describe Integrations::Jira, feature_category: :integrations do it 'logs exception when transition id is not valid' do allow(jira_integration).to receive(:log_exception) - WebMock.stub_request(:post, transitions_url).with(basic_auth: %w(jira-username jira-password)).and_raise("Bad Request") + WebMock.stub_request(:post, transitions_url).with(basic_auth: %w[jira-username jira-password]).and_raise("Bad Request") close_issue @@ -973,7 +973,7 @@ RSpec.describe Integrations::Jira, feature_category: :integrations do context 'when a transition fails' do before do - WebMock.stub_request(:post, transitions_url).with(basic_auth: %w(jira-username jira-password)).to_return do |request| + WebMock.stub_request(:post, transitions_url).with(basic_auth: %w[jira-username jira-password]).to_return do |request| { status: request.body.include?('"id":"2"') ? 500 : 200 } end end diff --git a/spec/models/integrations/teamcity_spec.rb b/spec/models/integrations/teamcity_spec.rb index c4c7202fae0..1537b10ba03 100644 --- a/spec/models/integrations/teamcity_spec.rb +++ b/spec/models/integrations/teamcity_spec.rb @@ -308,7 +308,7 @@ RSpec.describe Integrations::Teamcity, :use_clean_rails_memory_store_caching do def stub_post_to_build_queue(branch:) teamcity_full_url = "#{teamcity_url}/httpAuth/app/rest/buildQueue" body ||= %(<build branchName=\"#{branch}\"><buildType id=\"foo\"/></build>) - auth = %w(mic password) + auth = %w[mic password] stub_full_request(teamcity_full_url, method: :post).with( basic_auth: auth, @@ -320,7 +320,7 @@ RSpec.describe Integrations::Teamcity, :use_clean_rails_memory_store_caching do end def stub_request(status: 200, body: nil, build_status: 'success') - auth = %w(mic password) + auth = %w[mic password] body ||= %({"build":{"status":"#{build_status}","id":"666"}}) |