annotate test/integration/layout_test.rb @ 864:2465362d1b56 bug_145

Close obsolete branch bug_145
author Chris Cannam
date Wed, 11 May 2011 11:57:41 +0100
parents 1d32c0a0efbf
children af80e5618e9b
rev   line source
Chris@14 1 require "#{File.dirname(__FILE__)}/../test_helper"
Chris@14 2
Chris@14 3 class LayoutTest < ActionController::IntegrationTest
Chris@14 4 fixtures :all
Chris@14 5
Chris@14 6 test "browsing to a missing page should render the base layout" do
Chris@14 7 get "/users/100000000"
Chris@14 8
Chris@14 9 assert_response :not_found
Chris@14 10
Chris@14 11 # UsersController uses the admin layout by default
Chris@14 12 assert_select "#admin-menu", :count => 0
Chris@14 13 end
Chris@14 14
Chris@14 15 test "browsing to an unauthorized page should render the base layout" do
Chris@14 16 change_user_password('miscuser9', 'test')
Chris@14 17
Chris@14 18 log_user('miscuser9','test')
Chris@14 19
Chris@14 20 get "/admin"
Chris@14 21 assert_response :forbidden
Chris@14 22 assert_select "#admin-menu", :count => 0
Chris@14 23 end
Chris@14 24 end