allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [1/2] git commit: [#6864] ticket:496 add spam button for comments
Date Mon, 02 Dec 2013 16:02:57 GMT
Updated Branches:
  refs/heads/master 2a4914bba -> ac565c9e0


 [#6864] ticket:496 add spam button for comments


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

Branch: refs/heads/master
Commit: 0b8101b418b2829c064e43a95ac3db815fbcd510
Parents: 2a4914b
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Thu Nov 21 14:38:55 2013 +0400
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon Dec 2 15:56:41 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/widgets/moderate_post.html | 2 +-
 Allura/allura/tests/functional/test_discuss.py     | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0b8101b4/Allura/allura/templates/widgets/moderate_post.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/moderate_post.html b/Allura/allura/templates/widgets/moderate_post.html
index 4ff074c..0487016 100644
--- a/Allura/allura/templates/widgets/moderate_post.html
+++ b/Allura/allura/templates/widgets/moderate_post.html
@@ -27,9 +27,9 @@
         <a href="" class="moderate_post little_link"><span>Approve</span></a>
     </form>
     <br/>
+{%endif%}
     <form method="POST" class="moderate_spam" action="{{action}}">
         <input type="hidden" name="spam" value="True"/>
         <a href="" class="moderate_post little_link"><span>Spam</span></a>
     </form>
-{%endif%}
 <br/>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0b8101b4/Allura/allura/tests/functional/test_discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_discuss.py b/Allura/allura/tests/functional/test_discuss.py
index 9e65280..9664857 100644
--- a/Allura/allura/tests/functional/test_discuss.py
+++ b/Allura/allura/tests/functional/test_discuss.py
@@ -139,6 +139,10 @@ class TestDiscuss(TestController):
         self.app.get(thread_url, status=403, # forbidden
                      extra_environ=dict(username=non_admin))
 
+    def test_spam_link(self):
+        r = self._make_post('Test post')
+        assert '<span>Spam</span>' in r
+
     @patch('allura.controllers.discuss.g.spam_checker.submit_spam')
     def test_moderate(self, submit_spam):
         r = self._make_post('Test post')


Mime
View raw message