summaryrefslogtreecommitdiff
path: root/users/test/integration/api
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-07-19 12:21:40 +0200
committerAzul <azul@leap.se>2013-07-24 10:55:51 +0200
commitc0b88d9e8fe574d6164f48211db50f3b8a4c4d93 (patch)
tree20e42fd20547705acafb3c67efe4da381982a836 /users/test/integration/api
parent51582a668b04d2c1322ad1babe8599ae8797cd3b (diff)
setter for keys for dirty tracking, more robust tests
Just altering identity.keys did not mark identities as changed. Also we now have a sane default for keys.
Diffstat (limited to 'users/test/integration/api')
-rw-r--r--users/test/integration/api/account_flow_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb
index 4c94389..93b6507 100644
--- a/users/test/integration/api/account_flow_test.rb
+++ b/users/test/integration/api/account_flow_test.rb
@@ -79,8 +79,13 @@ class AccountFlowTest < RackTest
test_public_key = 'asdlfkjslfdkjasd'
original_login = @user.login
new_login = 'zaph'
+ User.find_by_login(new_login).try(:destroy)
+ Identity.by_address.key(new_login + '@' + APP_CONFIG[:domain]).each do |identity|
+ identity.destroy
+ end
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 last_response.successful?
assert_equal test_public_key, @user.public_key
assert_equal new_login, @user.login
# eventually probably want to remove most of this into a non-integration functional test