from . import WikiBaseTestCase


class WebContentTestCase(WikiBaseTestCase):
    """
        Various test cases around web content.
    """

    def test_index_missing(self):
        """
            Assert the wiki will correctly play the content missing
            index page, if no index page exists.
        """
        rsp = self.app.get('/')
        assert b"You did not create any content yet." in rsp.data
        assert rsp.status_code == 200

@@ -26,16 +26,165 @@
 tCase%0A%0A%0A
+CONFIGURATION_PRIVATE = u%22%22%22%0APRIVATE=True%0ATITLE='test'%0ADEFAULT_SEARCH_IGNORE_CASE=False%0ADEFAULT_AUTHENTICATION_METHOD='hash'%0ASECRET_KEY='test'%0A%22%22%22%0A%0A%0A
 class We
@@ -594,8 +594,484 @@
  == 200%0A
+%0A%0Aclass AuthenticationTestCase(WikiBaseTestCase):%0A    %22%22%22%0A        Test cases around authentication.%0A    %22%22%22%0A%0A    config_content = CONFIGURATION_PRIVATE%0A%0A    def test_auth_protection_works(self):%0A        %22%22%22%0A            Assert that if auth is required and user is not%0A            authenticated the request fails.%0A        %22%22%22%0A        rsp = self.app.get('/')%0A        assert rsp.status_code == 302%0A        assert rsp.headers%5B'Location'%5D == %22http://localhost/user/login/?next=%252F%22%0A

fix #83: add test to verify auth works