incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [17/28] git commit: [#2835] ticket:304 Test for url_paginated with artifact attached
Date Wed, 24 Apr 2013 18:13:51 GMT
[#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/master
Commit: eb43a31edf8152274c65266568f53d0022fc8d6d
Parents: 1bdaa1e
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Apr 4 09:21:56 2013 +0000
Committer: Dave Brondsema <dbrondsema@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'


Mime
View raw message