Sha256: 47f4a9407deb03e61a7c21f10ab7016fe6bfc0e253243a717943d23170f4ff97
Contents?: true
Size: 701 Bytes
Versions: 8
Compression:
Stored size: 701 Bytes
Contents
require 'test_helper' class RailsSso::FailureAppTest < ActiveSupport::TestCase test "regular call runs respond action and redirects to sso" do env = { 'REQUEST_URI' => 'http://test.host', 'HTTP_HOST' => 'test.host' } response = RailsSso::FailureApp.call(env).to_a assert_equal 302, response.first assert_equal 'http://test.host/sso/', response.second['Location'] end test "json call runs respond action and renders 401" do env = { 'REQUEST_URI' => 'http://test.host', 'HTTP_HOST' => 'test.host', 'CONTENT_TYPE' => 'application/json' } response = RailsSso::FailureApp.call(env).to_a assert_equal 401, response.first end end
Version data entries
8 entries across 8 versions & 1 rubygems