Chris@117: require File.expand_path('../../test_helper', __FILE__) Chris@14: Chris@14: class LayoutTest < ActionController::IntegrationTest Chris@14: fixtures :all Chris@14: Chris@14: test "browsing to a missing page should render the base layout" do Chris@14: get "/users/100000000" Chris@14: Chris@14: assert_response :not_found Chris@14: Chris@14: # UsersController uses the admin layout by default Chris@14: assert_select "#admin-menu", :count => 0 Chris@14: end Chris@14: Chris@14: test "browsing to an unauthorized page should render the base layout" do Chris@14: change_user_password('miscuser9', 'test') Chris@14: Chris@14: log_user('miscuser9','test') Chris@14: Chris@14: get "/admin" Chris@14: assert_response :forbidden Chris@14: assert_select "#admin-menu", :count => 0 Chris@14: end Chris@14: end