summaryrefslogtreecommitdiff
path: root/users/test/functional/test_helpers_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-16 08:42:36 +0200
committerAzul <azul@leap.se>2014-05-16 08:42:36 +0200
commit8fbbb8717f0578536b97c2dc0883c632f120e976 (patch)
tree17aeb2b48ada703ac916a9a65fbf3c75a5dadb86 /users/test/functional/test_helpers_test.rb
parent81555ec6244ed76f92e3629880f68104b8705817 (diff)
parenta4f7a410c536d88c91c834cab6ee950c71005ddd (diff)
Merge remote-tracking branch 'origin/develop'
Conflicts: app/assets/javascripts/srp test/nagios/soledad_sync.py test/nagios/webapp_login.py
Diffstat (limited to 'users/test/functional/test_helpers_test.rb')
-rw-r--r--users/test/functional/test_helpers_test.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/users/test/functional/test_helpers_test.rb b/users/test/functional/test_helpers_test.rb
deleted file mode 100644
index 845e516..0000000
--- a/users/test/functional/test_helpers_test.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# There are a few test helpers for dealing with login etc.
-# We test them here and also document their behaviour.
-#
-
-require 'test_helper'
-
-class TestHelpersTest < ActionController::TestCase
- tests ApplicationController # testing no controller in particular
-
- def test_login_stubs_warden
- login
- assert_equal @current_user, request.env['warden'].user
- end
-
- def test_login_token_authenticates
- login
- assert_equal @current_user, @controller.send(:token_authenticate)
- end
-
- def test_login_stubs_token
- login
- assert @token
- assert_equal @current_user, @token.authenticate
- end
-
- def test_login_adds_token_header
- login
- token_present = @controller.authenticate_with_http_token do |token, options|
- assert_equal @token.id, token
- end
- # authenticate_with_http_token just returns nil and does not
- # execute the block if there is no token. So we have to also
- # ensure it was run:
- assert token_present
- end
-end
-