Sha256: 78a80f5877e22be932a61deb6873d56fddaad6c70c896d21211cd4e49d518e6b
Contents?: true
Size: 606 Bytes
Versions: 3
Compression:
Stored size: 606 Bytes
Contents
require 'test_helper' class RemoteUserAuthServiceTest < ActionController::TestCase def setup @auth_service = OpenShift::RemoteUserAuthService.new @request.env["Accept"] = "application/json" end def test_authenticate_success @request.env["REMOTE_USER"] = "test" data = @auth_service.authenticate(@request, "test", "test") assert_equal data[:auth_method], :login assert_equal data[:username], "test" end def test_authenticate_failure assert_raise OpenShift::AccessDeniedException do data = @auth_service.authenticate(@request, "foo", "bar") end end end
Version data entries
3 entries across 3 versions & 1 rubygems