summaryrefslogtreecommitdiff
path: root/spec/requests/api/runner_spec.rb
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2017-03-06 14:50:56 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2017-03-06 20:54:30 +0100
commit0905fe4d7ad778eba78d57da2fa1f38575721622 (patch)
treec2df0150a20d1e09b78adb805ce1ca3b0af5601e /spec/requests/api/runner_spec.rb
parent2956f0a6f568bdac6eecb902a877e7d339211383 (diff)
downloadgitlab-ce-0905fe4d7ad778eba78d57da2fa1f38575721622.tar.gz
Change artifacts and cache fields to arrays
Diffstat (limited to 'spec/requests/api/runner_spec.rb')
-rw-r--r--spec/requests/api/runner_spec.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 9086094d121..a1819c4d5d3 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -308,11 +308,16 @@ describe API::Runner do
{ 'key' => 'DB_NAME', 'value' => 'postgres', 'public' => true }]
end
let(:expected_artifacts) do
- { 'name' => 'artifacts_file',
- 'untracked' => false,
- 'paths' => %w(out/),
- 'when' => 'always',
- 'expire_in' => '7d' }
+ [{ 'name' => 'artifacts_file',
+ 'untracked' => false,
+ 'paths' => %w(out/),
+ 'when' => 'always',
+ 'expire_in' => '7d' }]
+ end
+ let(:expected_cache) do
+ [{ 'key' => 'cache_key',
+ 'untracked' => false,
+ 'paths' => ['vendor/*'] }]
end
it 'starts a job' do
@@ -329,6 +334,7 @@ describe API::Runner do
expect(json_response['services']).to eq([{ 'name' => 'postgres' }])
expect(json_response['steps']).to eq(expected_steps)
expect(json_response['artifacts']).to eq(expected_artifacts)
+ expect(json_response['cache']).to eq(expected_cache)
expect(json_response['variables']).to include(*expected_variables)
end