Mercurial > hg > soundsoftware-site
annotate test/integration/.svn/text-base/layout_test.rb.svn-base @ 257:3ecf99348b9f feature_80
* Enable toggling file active state through the files interface
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 04 Mar 2011 12:46:26 +0000 |
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 |