summaryrefslogtreecommitdiff
path: root/users/test
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-11-26 11:22:47 +0100
committerAzul <azul@leap.se>2013-11-26 11:41:01 +0100
commit7de12c71ce7eb4eeb6e0795275434ed4a4120c25 (patch)
tree9916fcd11ccf289a9dfcf0f183f7655789464092 /users/test
parent21cc6313320efa2992a58b7434468678ca6cf3b6 (diff)
ignore attempts to empty public_key, refactor
refactor: prepare validations of the uploaded pgp keys
Diffstat (limited to 'users/test')
-rw-r--r--users/test/integration/api/account_flow_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb
index e41befa..90f2a97 100644
--- a/users/test/integration/api/account_flow_test.rb
+++ b/users/test/integration/api/account_flow_test.rb
@@ -114,9 +114,9 @@ class AccountFlowTest < RackTest
# should not overwrite public key:
put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:blee => :blah}, :format => :json
assert_equal test_public_key, Identity.for(@user).keys[:pgp]
- # should overwrite public key:
- put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:public_key => nil}, :format => :json
- assert_nil Identity.for(@user).keys[:pgp]
+ # should not empty public key:
+ put "http://api.lvh.me:3000/1/users/" + @user.id + '.json', :user => {:public_key => ""}, :format => :json
+ assert_equal test_public_key, Identity.for(@user).keys[:pgp]
end
end