Sha256: 17ddb68c292c7ac4e6e8cec1db91fb13bb459e2092d48ee236828e8443cbfbc1
Contents?: true
Size: 1.23 KB
Versions: 16
Compression:
Stored size: 1.23 KB
Contents
require File.join(File.dirname(__FILE__), '/../../test_helper') class Cms::SessionsControllerTest < ActionController::TestCase include Cms::ControllerTestHelper def test_not_redirected_to_cms_site_if_public_site @request.host = "foo.com" @request.request_uri = "/cms/login" get :new assert_response :success end def test_not_redirected_if_cms_site @request.host = "cms.foo.com" @request.request_uri = "/cms/login" get :new assert_response :success log @response.body assert_select "title", "CMS Login" end end class Cms::SessionsControllerCacheEnabledTest < ActionController::TestCase include Cms::ControllerTestHelper tests Cms::SessionsController def setup @controller.perform_caching = true end def teardown @controller.perform_caching = false end def test_redirected_to_cms_site_if_public_site @request.host = "foo.com" @request.request_uri = "/cms/login" get :new assert_redirected_to "http://cms.foo.com/cms/login" end def test_not_redirected_if_cms_site @request.host = "cms.foo.com" @request.request_uri = "/cms/login" get :new assert_response :success log @response.body assert_select "title", "CMS Login" end end
Version data entries
16 entries across 16 versions & 8 rubygems