diff options
author | azul <azul@riseup.net> | 2017-03-23 09:03:25 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-03-23 09:03:25 +0000 |
commit | 96c3123b9a30df3d7750b1f8e4bda2aba3d1fcb7 (patch) | |
tree | f16e3d9f830cef89d523ef2da66fd27bb2afd426 /test | |
parent | 3efe125d6e3bd5f4eecd18952376ffc37e09b9c5 (diff) | |
parent | 1e672227a23afbb9f319a0aefa0b0ca3495fa1c6 (diff) |
Merge branch 'bugfix/handle-couch-conflicts' into 'master'
bugfix: handle couch 404s
See merge request !26
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/error_handling_test.rb | 22 | ||||
-rw-r--r-- | test/integration/api/update_account_test.rb | 8 |
2 files changed, 8 insertions, 22 deletions
diff --git a/test/functional/error_handling_test.rb b/test/functional/error_handling_test.rb deleted file mode 100644 index 47e44ce..0000000 --- a/test/functional/error_handling_test.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'test_helper' - -class ErrorHandlingTest < ActionController::TestCase - tests HomeController - - def setup - HomeController.any_instance.stubs(:index).raises - end - - def test_json_error - get :index, format: :json - assert_equal 'application/json', @response.content_type - assert json = JSON.parse(@response.body) - assert_equal ['error'], json.keys - end - - def test_html_error_reraises - assert_raises RuntimeError do - get :index - end - end -end diff --git a/test/integration/api/update_account_test.rb b/test/integration/api/update_account_test.rb index 108f05d..f083dbc 100644 --- a/test/integration/api/update_account_test.rb +++ b/test/integration/api/update_account_test.rb @@ -54,4 +54,12 @@ class UpdateAccountTest < SrpTest # does not change login if no password_verifier is present assert_equal original_login, @user.reload.login end + + test "destroy account" do + authenticate + url = api_url("users/#{@user.id}.json?identities=destroy") + delete url, nil, auth_headers + assert last_response.successful? + end + end |