annotate test/integration/.svn/text-base/layout_test.rb.svn-base @ 904:0a8317a50fa0 redmine-1.1

Close obsolete branch redmine-1.1
author Chris Cannam
date Fri, 14 Jan 2011 12:53:21 +0000
parents af80e5618e9b
children cbce1fd3b1b7
rev   line source
Chris@117 1 require File.expand_path('../../test_helper', __FILE__)
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