diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/integration/.svn/text-base/layout_test.rb.svn-base	Wed Aug 25 16:30:24 2010 +0100
@@ -0,0 +1,24 @@
+require "#{File.dirname(__FILE__)}/../test_helper"
+
+class LayoutTest < ActionController::IntegrationTest
+  fixtures :all
+
+  test "browsing to a missing page should render the base layout" do
+    get "/users/100000000"
+
+    assert_response :not_found
+
+    # UsersController uses the admin layout by default
+    assert_select "#admin-menu", :count => 0
+  end
+
+  test "browsing to an unauthorized page should render the base layout" do
+    change_user_password('miscuser9', 'test')
+    
+    log_user('miscuser9','test')
+
+    get "/admin"
+    assert_response :forbidden
+    assert_select "#admin-menu", :count => 0
+  end
+end