You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/04/25 00:31:00 UTC

[35/50] git commit: [#2835] ticket:304 Test for url_paginated with artifact attached

[#2835] ticket:304 Test for url_paginated with artifact attached


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

Branch: refs/heads/cj/5655
Commit: eb43a31edf8152274c65266568f53d0022fc8d6d
Parents: 1bdaa1e
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Apr 4 09:21:56 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 24 16:34:42 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/model/test_discussion.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/eb43a31e/Allura/allura/tests/model/test_discussion.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_discussion.py b/Allura/allura/tests/model/test_discussion.py
index f49446b..7e9df32 100644
--- a/Allura/allura/tests/model/test_discussion.py
+++ b/Allura/allura/tests/model/test_discussion.py
@@ -311,6 +311,17 @@ def test_post_url_paginated():
 
 
 @with_setup(setUp, tearDown)
+def test_post_url_paginated_with_artifact():
+    """Post.url_paginated should return link to attached artifact, if any"""
+    from forgewiki.model import Page
+    page = Page.upsert(title='Test Page')
+    thread = page.discussion_thread
+    comment = thread.post('Comment')
+    url = page.url() + '?limit=50#' + comment.slug
+    assert_equals(comment.url_paginated(), url)
+
+
+@with_setup(setUp, tearDown)
 def test_post_notify():
     d = M.Discussion(shortname='test', name='test')
     d.monitoring_email = 'darthvader@deathstar.org'