summaryrefslogtreecommitdiff
path: root/users/test/integration/api/login_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-02-08 16:20:37 +0100
committerAzul <azul@leap.se>2014-02-10 14:26:30 +0100
commitc8fcd0d26c3ad5c1c3cfbaf6b57239f907925ed6 (patch)
tree664dfcfb95eb68babd51b67a6ef21a314c8ea77a /users/test/integration/api/login_test.rb
parentcbd757cf151cd61bfdd5637d09f43e4831fec3bb (diff)
require token when logging out via API
Diffstat (limited to 'users/test/integration/api/login_test.rb')
-rw-r--r--users/test/integration/api/login_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/users/test/integration/api/login_test.rb b/users/test/integration/api/login_test.rb
index d56dfd1..92d153f 100644
--- a/users/test/integration/api/login_test.rb
+++ b/users/test/integration/api/login_test.rb
@@ -41,4 +41,10 @@ class LoginTest < SrpTest
logout
assert_equal 204, last_response.status
end
+
+ test "logout requires token" do
+ authenticate
+ logout(nil, {})
+ assert_equal 422, last_response.status
+ end
end