diff options
author | Azul <azul@leap.se> | 2013-11-26 11:22:47 +0100 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-12-06 15:52:11 -0800 |
commit | e64e746759bb241536612c949361442f269ef2f0 (patch) | |
tree | 7d05a83ebfa23df3dbb1b9ceeecbef057c6c1eb2 /users/test/integration/api | |
parent | 015ad90c98c55a078fdfe723d470ad732e807737 (diff) |
ignore attempts to empty public_key, refactor
refactor: prepare validations of the uploaded pgp keys
Diffstat (limited to 'users/test/integration/api')
-rw-r--r-- | users/test/integration/api/account_flow_test.rb | 6 |
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 |