diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-06 14:50:56 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-06 20:54:30 +0100 |
commit | 0905fe4d7ad778eba78d57da2fa1f38575721622 (patch) | |
tree | c2df0150a20d1e09b78adb805ce1ca3b0af5601e /spec/requests | |
parent | 2956f0a6f568bdac6eecb902a877e7d339211383 (diff) | |
download | gitlab-ce-0905fe4d7ad778eba78d57da2fa1f38575721622.tar.gz |
Change artifacts and cache fields to arrays
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/runner_spec.rb | 16 |
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 |