diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-18 04:29:18 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 13:13:47 +0300 |
commit | 0f627f1c6046be06986ee0e6e46d390ec2c18507 (patch) | |
tree | 499dd109b2b23166c51cda042fa10c4772dd2241 /spec/requests | |
parent | 8b1f1ab32e528cf6f7e21b54cf722dae386c5a1d (diff) |
Fix `raise_error` without an argument deprecation warnings
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/api_helpers_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/api_helpers_spec.rb b/spec/requests/api/api_helpers_spec.rb index 9a4102c752d..4048c297013 100644 --- a/spec/requests/api/api_helpers_spec.rb +++ b/spec/requests/api/api_helpers_spec.rb @@ -72,13 +72,13 @@ describe API, api: true do it "should throw an error when the current user is not an admin and attempting to sudo" do set_env(user, admin.id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(user, admin.id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_env(user, admin.username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(user, admin.username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should throw an error when the user cannot be found for a given id" do @@ -86,10 +86,10 @@ describe API, api: true do expect(user.id).not_to eq(id) expect(admin.id).not_to eq(id) set_env(admin, id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(admin, id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should throw an error when the user cannot be found for a given username" do @@ -97,10 +97,10 @@ describe API, api: true do expect(user.username).not_to eq(username) expect(admin.username).not_to eq(username) set_env(admin, username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(admin, username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should handle sudo's to oneself" do |