Mercurial > hg > soundsoftware-site
comparison test/integration/.svn/text-base/layout_test.rb.svn-base @ 14:1d32c0a0efbf
* Update to SVN trunk (revisions 3892-4040)
author | Chris Cannam |
---|---|
date | Wed, 25 Aug 2010 16:30:24 +0100 |
parents | |
children | af80e5618e9b |
comparison
equal
deleted
inserted
replaced
4:9cc62779c13a | 14:1d32c0a0efbf |
---|---|
1 require "#{File.dirname(__FILE__)}/../test_helper" | |
2 | |
3 class LayoutTest < ActionController::IntegrationTest | |
4 fixtures :all | |
5 | |
6 test "browsing to a missing page should render the base layout" do | |
7 get "/users/100000000" | |
8 | |
9 assert_response :not_found | |
10 | |
11 # UsersController uses the admin layout by default | |
12 assert_select "#admin-menu", :count => 0 | |
13 end | |
14 | |
15 test "browsing to an unauthorized page should render the base layout" do | |
16 change_user_password('miscuser9', 'test') | |
17 | |
18 log_user('miscuser9','test') | |
19 | |
20 get "/admin" | |
21 assert_response :forbidden | |
22 assert_select "#admin-menu", :count => 0 | |
23 end | |
24 end |