allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [2/3] allura git commit: [#8249] Add test for ForgeBlog revert
Date Fri, 26 Oct 2018 20:39:55 GMT
[#8249] Add test for ForgeBlog revert


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

Branch: refs/heads/master
Commit: 0c1bab6f951e17dfc93dcdc1ea7e6fd689b0af7e
Parents: f554fa5
Author: Shalitha <shalithasuranga@gmail.com>
Authored: Sun Oct 21 13:32:48 2018 +0530
Committer: Kenton Taylor <ktaylor@slashdotmedia.com>
Committed: Fri Oct 26 20:31:23 2018 +0000

----------------------------------------------------------------------
 ForgeBlog/forgeblog/tests/functional/test_root.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/0c1bab6f/ForgeBlog/forgeblog/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/functional/test_root.py b/ForgeBlog/forgeblog/tests/functional/test_root.py
index 26c5149..8a94537 100644
--- a/ForgeBlog/forgeblog/tests/functional/test_root.py
+++ b/ForgeBlog/forgeblog/tests/functional/test_root.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 #       Licensed to the Apache Software Foundation (ASF) under one
 #       or more contributor license agreements.  See the NOTICE file
 #       distributed with this work for additional information
@@ -232,6 +234,15 @@ class Test(TestController):
         assert '<script>alert' not in response
         assert '<ins> &lt;script&gt;alert' in response
 
+    def test_post_revert(self):
+        self._post()
+        d = self._blog_date()
+        self._post('/%s/my-post' % d, text='somet├ęst')
+        response = self.app.post('/blog/%s/my-post/revert' % d, params=dict(version='1'))
+        assert '.' in response.json['location']
+        response = self.app.get('/blog/%s/my-post/' % d)
+        assert 'Nothing to see here' in response
+
     def test_invalid_lookup(self):
         r = self.app.get('/blog/favicon.ico', status=404)
 


Mime
View raw message