diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-10 20:12:19 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-11 20:02:09 +0300 |
commit | 3578153d3e838da92587fed88a608d9a5458c37c (patch) | |
tree | 5b7f1b21ef9361e63bb83b3be9973aec492de3af /spec/requests/api/triggers_spec.rb | |
parent | 91cdb08d5fa83a86f5f18088bf148e832732bed9 (diff) |
Fix triggers tests
Diffstat (limited to 'spec/requests/api/triggers_spec.rb')
-rw-r--r-- | spec/requests/api/triggers_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb index 899458e619e..314bd7ddc59 100644 --- a/spec/requests/api/triggers_spec.rb +++ b/spec/requests/api/triggers_spec.rb @@ -25,7 +25,7 @@ describe API::API do end it 'should return not found if project is not found' do - post api('/projects/0/refs/master/trigger/builds'), options.merge(ref: 'master') + post api('/projects/0/trigger/builds'), options.merge(ref: 'master') expect(response.status).to eq(404) end @@ -57,19 +57,19 @@ describe API::API do end it 'should validate variables to be a hash' do - post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: 'value', refs: 'master') + post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: 'value', ref: 'master') expect(response.status).to eq(400) expect(json_response['message']).to eq('variables needs to be a hash') end it 'should validate variables needs to be a map of key-valued strings' do - post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: { key: %w(1 2) }, refs: 'master') + post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: { key: %w(1 2) }, ref: 'master') expect(response.status).to eq(400) expect(json_response['message']).to eq('variables needs to be a map of key-valued strings') end it 'create trigger request with variables' do - post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: variables, refs: 'master') + post api("/projects/#{project.id}/trigger/builds"), options.merge(variables: variables, ref: 'master') expect(response.status).to eq(201) commit.builds.reload expect(commit.builds.first.trigger_request.variables).to eq(variables) |