test/functional/tests/pretend_controller_test.rb in browsercms-3.1.4 vs test/functional/tests/pretend_controller_test.rb in browsercms-3.1.5
- old
+ new
@@ -1,10 +1,15 @@
require 'test_helper'
class Tests::PretendControllerTest < ActionController::TestCase
include Cms::ControllerTestHelper
+ def setup
+ remove_all_sitemap_fixtures_to_avoid_bugs
+ given_a_site_exists
+ end
+
test "open" do
get :open
assert_response :success
assert_select 'h1', "Open Page"
end
@@ -12,11 +17,11 @@
test "restricted members section should give standard CMS error page when not logged in" do
restricted_section = Factory(:section, :path=>"/members")
get :restricted
assert_response 403
- assert_select 'h1', "Access Denied"
+ assert_select 'title', "Access Denied"
end
test "restricted page should be visible to cmsadmins" do
restricted_section = Factory(:section, :path=>"/members")
login_as_cms_admin
@@ -30,11 +35,10 @@
# Matches content_controller_test
test "not-found when not logged in" do
get :not_found
assert_response :missing
assert_select "title", "Not Found"
- assert_select "h1", "Page Not Found"
end
# See content_controller_tests for similar behavio
test "Throwing NotFound while logged in as admin will render error rather than 404 page." do
login_as_cms_admin
@@ -47,8 +51,7 @@
test "error" do
get :error
assert_response :error
assert_select "title", "Server Error"
- assert_select "p", "The server encountered an unexpected condition that prevented it from fulfilling the request.", "Default CMS server error content"
end
end