Sha256: 886715e261576cc8659e1d11e4c6afd209cb8d767620e3636f93069289a7888c
Contents?: true
Size: 911 Bytes
Versions: 34
Compression:
Stored size: 911 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class AuthenticationTest < ActionDispatch::IntegrationTest def test_get_with_unauthorized_access assert_equal 'ComfortableMexicanSofa::HttpAuth', ComfortableMexicanSofa.config.authentication get '/cms-admin/pages' assert_response :unauthorized get '/' assert_response :success end def test_get_with_authorized_access http_auth :get, '/cms-admin/pages' assert_response :success end def test_get_with_changed_default_config assert_equal 'ComfortableMexicanSofa::HttpAuth', ComfortableMexicanSofa.config.authentication ComfortableMexicanSofa::HttpAuth.username = 'newuser' ComfortableMexicanSofa::HttpAuth.password = 'newpass' http_auth :get, '/cms-admin/pages' assert_response :unauthorized http_auth :get, '/cms-admin/pages', {}, 'newuser', 'newpass' assert_response :success end end
Version data entries
34 entries across 34 versions & 1 rubygems