summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api/srp_test.rb2
-rw-r--r--test/integration/api/update_account_test.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/test/integration/api/srp_test.rb b/test/integration/api/srp_test.rb
index b9605f9..ef5d9b8 100644
--- a/test/integration/api/srp_test.rb
+++ b/test/integration/api/srp_test.rb
@@ -46,7 +46,7 @@ class SrpTest < RackTest
@password = password
end
- def update_user(params)
+ def update_user(params = {})
put api_url("users/#{@user.id}.json"),
user_params(params),
auth_headers
diff --git a/test/integration/api/update_account_test.rb b/test/integration/api/update_account_test.rb
index f083dbc..dd28b06 100644
--- a/test/integration/api/update_account_test.rb
+++ b/test/integration/api/update_account_test.rb
@@ -19,6 +19,14 @@ class UpdateAccountTest < SrpTest
assert_login_required
end
+ test "empty request" do
+ authenticate
+ update_user
+ refute last_response.successful?
+ assert_equal 400, last_response.status
+ assert_equal '', last_response.body
+ end
+
test "update password via api" do
authenticate
update_user password: "No! Verify me instead."