allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [5/5] allura git commit: [#8071] Add test for create_wiki_page
Date Thu, 14 Apr 2016 22:30:01 GMT
[#8071] Add test for create_wiki_page


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/eb61cbe7
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/eb61cbe7
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/eb61cbe7

Branch: refs/heads/hs/8071
Commit: eb61cbe7c40092ba8c50d47d4e97ee7dd39d321e
Parents: 35eb0ea
Author: Heith Seewald <heiths@gmail.com>
Authored: Thu Apr 14 18:29:28 2016 -0400
Committer: Heith Seewald <heiths@gmail.com>
Committed: Thu Apr 14 18:29:28 2016 -0400

----------------------------------------------------------------------
 ForgeWiki/forgewiki/tests/functional/test_root.py | 7 +++++++
 ForgeWiki/forgewiki/wiki_main.py                  | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/eb61cbe7/ForgeWiki/forgewiki/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_root.py b/ForgeWiki/forgewiki/tests/functional/test_root.py
index 95d590d..26c0949 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -60,6 +60,13 @@ class TestRootController(TestController):
                          extra_environ=dict(username='*anonymous')).follow()
         assert 'Create Page' not in r
 
+    @td.with_wiki
+    def test_create_wiki_page(self):
+        url = u"/p/test/wiki/create_wiki_page/"
+        r = self.app.get(url)
+        assert u'test' in r
+        assert u'Create page' in r.body
+
     def test_root_markdown_syntax(self):
         response = self.app.get('/wiki/markdown_syntax/')
         assert 'Markdown Syntax' in response

http://git-wip-us.apache.org/repos/asf/allura/blob/eb61cbe7/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 0c87a3c..c5325b9 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -490,7 +490,7 @@ class RootController(BaseController, DispatchIndex, FeedController):
     @with_trailing_slash
     @expose('jinja:forgewiki:templates/wiki/create_page.html')
     def create_wiki_page(self):
-        return dict(allow_create=has_access(c.app, 'create')())
+        return {}
 
     @with_trailing_slash
     @expose('jinja:allura:templates/markdown_syntax.html')


Mime
View raw message