summaryrefslogtreecommitdiff
path: root/users/test/integration/api/account_flow_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/test/integration/api/account_flow_test.rb')
-rw-r--r--users/test/integration/api/account_flow_test.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb
index 1698105..d4360de 100644
--- a/users/test/integration/api/account_flow_test.rb
+++ b/users/test/integration/api/account_flow_test.rb
@@ -66,8 +66,7 @@ class AccountFlowTest < RackTest
test "signup and wrong password login attempt" do
srp = SRP::Client.new @login, :password => "wrong password"
server_auth = srp.authenticate(self)
- assert_json_error login: "Not a valid username/password combination",
- password: "Not a valid username/password combination"
+ assert_json_error "base" => "Not a valid username/password combination"
assert !last_response.successful?
assert_nil server_auth["M2"]
end
@@ -78,8 +77,7 @@ class AccountFlowTest < RackTest
assert_raises RECORD_NOT_FOUND do
server_auth = srp.authenticate(self)
end
- assert_json_error login: "Not a valid username/password combination",
- password: "Not a valid username/password combination"
+ assert_json_error "base" => "Not a valid username/password combination"
assert !last_response.successful?
assert_nil server_auth
end
@@ -88,10 +86,11 @@ class AccountFlowTest < RackTest
server_auth = @srp.authenticate(self)
test_public_key = 'asdlfkjslfdkjasd'
original_login = @user.login
- put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:public_key => test_public_key, :login => 'failed_login_name'}, :format => :json
+ new_login = 'zaph'
+ put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:public_key => test_public_key, :login => new_login}, :format => :json
@user.reload
assert_equal test_public_key, @user.public_key
- assert_equal original_login, @user.login
+ assert_equal new_login, @user.login
# eventually probably want to remove most of this into a non-integration functional test
# should not overwrite public key:
put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:blee => :blah}, :format => :json