diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-18 01:52:17 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-19 02:04:31 +0300 |
commit | b44a2c801a64fb282cea794871fcfcf81e4ec539 (patch) | |
tree | 32e699b6efa548048abe11f29f84e85e3d2a034f /spec/requests/api/system_hooks_spec.rb | |
parent | 5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff) |
Update specs to rails5 format
Updates specs to use new rails5 format.
The old format:
`get :show, { some: params }, { some: headers }`
The new format:
`get :show, params: { some: params }, headers: { some: headers }`
Diffstat (limited to 'spec/requests/api/system_hooks_spec.rb')
-rw-r--r-- | spec/requests/api/system_hooks_spec.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index 6c57d443cbf..b6e8d74c2e9 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -45,7 +45,7 @@ describe API::SystemHooks do describe "POST /hooks" do it "creates new hook" do expect do - post api("/hooks", admin), url: 'http://example.com' + post api("/hooks", admin), params: { url: 'http://example.com' } end.to change { SystemHook.count }.by(1) end @@ -56,7 +56,7 @@ describe API::SystemHooks do end it "responds with 400 if url is invalid" do - post api("/hooks", admin), url: 'hp://mep.mep' + post api("/hooks", admin), params: { url: 'hp://mep.mep' } expect(response).to have_gitlab_http_status(400) end @@ -68,7 +68,7 @@ describe API::SystemHooks do end it 'sets default values for events' do - post api('/hooks', admin), url: 'http://mep.mep' + post api('/hooks', admin), params: { url: 'http://mep.mep' } expect(response).to have_gitlab_http_status(201) expect(json_response['enable_ssl_verification']).to be true @@ -79,11 +79,13 @@ describe API::SystemHooks do it 'sets explicit values for events' do post api('/hooks', admin), - url: 'http://mep.mep', - enable_ssl_verification: false, - push_events: true, - tag_push_events: true, - merge_requests_events: true + params: { + url: 'http://mep.mep', + enable_ssl_verification: false, + push_events: true, + tag_push_events: true, + merge_requests_events: true + } expect(response).to have_http_status(201) expect(json_response['enable_ssl_verification']).to be false |