summaryrefslogtreecommitdiff
path: root/spec/requests/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-02-24 17:14:35 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-02-24 17:14:35 +0800
commit83418ad846d07658303a9e79f14c51cebbb66cfa (patch)
treef0f06ed3f3654fc6337ad3a5ec0c6397a3871a95 /spec/requests/ci
parent91965cefebfa6b2199b9b48e79752bf62cd67305 (diff)
parentc5b29ed6f36779dbb96f4cdc7b1b0bce8bb8dc5e (diff)
downloadgitlab-ce-83418ad846d07658303a9e79f14c51cebbb66cfa.tar.gz
Merge remote-tracking branch 'upstream/master' into 27762-add-default-artifacts-expiration
* upstream/master: (247 commits) Switched CONTRIBUTING.md style guide recommendation for method chaining Fix new offenses Stylistic tweaks Fix OAuth/SAML user blocking behavior Revert "Enable Style/DotPosition" Revert "Prefer leading style for Style/DotPosition" Revert "Enable Style/BarePercentLiterals" Manually correct autocorrect Move up delegate calls Exclude migrations from Style/MutableConstant ActiveSupport delegation is preferred over Forwardable Update haml_lint to work with newest rubocop Add explanations to cops Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml Order cops alphabetically Don’t exclude some file in lib from rubocop Fix new offenses Enable Rails/Delegate Enable Style/WordArray ...
Diffstat (limited to 'spec/requests/ci')
-rw-r--r--spec/requests/ci/api/builds_spec.rb2
-rw-r--r--spec/requests/ci/api/runners_spec.rb2
-rw-r--r--spec/requests/ci/api/triggers_spec.rb3
3 files changed, 4 insertions, 3 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb
index f2385da8c13..c7284be09b7 100644
--- a/spec/requests/ci/api/builds_spec.rb
+++ b/spec/requests/ci/api/builds_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Ci::API::Builds do
include ApiHelpers
- let(:runner) { FactoryGirl.create(:ci_runner, tag_list: ["mysql", "ruby"]) }
+ let(:runner) { FactoryGirl.create(:ci_runner, tag_list: %w(mysql ruby)) }
let(:project) { FactoryGirl.create(:empty_project, shared_runners_enabled: false) }
let(:last_update) { nil }
diff --git a/spec/requests/ci/api/runners_spec.rb b/spec/requests/ci/api/runners_spec.rb
index bd55934d0c8..8719313783e 100644
--- a/spec/requests/ci/api/runners_spec.rb
+++ b/spec/requests/ci/api/runners_spec.rb
@@ -41,7 +41,7 @@ describe Ci::API::Runners do
it 'creates runner' do
expect(response).to have_http_status 201
- expect(Ci::Runner.first.tag_list.sort).to eq(["tag1", "tag2"])
+ expect(Ci::Runner.first.tag_list.sort).to eq(%w(tag1 tag2))
end
end
diff --git a/spec/requests/ci/api/triggers_spec.rb b/spec/requests/ci/api/triggers_spec.rb
index a30be767119..5321f8b134f 100644
--- a/spec/requests/ci/api/triggers_spec.rb
+++ b/spec/requests/ci/api/triggers_spec.rb
@@ -60,7 +60,8 @@ describe Ci::API::Triggers do
it 'validates variables to be a hash' do
post ci_api("/projects/#{project.ci_id}/refs/master/trigger"), options.merge(variables: 'value')
expect(response).to have_http_status(400)
- expect(json_response['message']).to eq('variables needs to be a hash')
+
+ expect(json_response['error']).to eq('variables is invalid')
end
it 'validates variables needs to be a map of key-valued strings' do