aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2013-01-18 21:17:52 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2013-01-18 21:21:42 +0100
commitd92fbdc4ea23ed5bc4f439358d83bee01b76b964 (patch)
tree16fac03c6dd4ad465a6d9afd2694171031d7c11b
parentafbfd40578ca93babe191bb0edef360822c91a27 (diff)
downloadmediagoblin-d92fbdc4ea23ed5bc4f439358d83bee01b76b964.tar.lz
mediagoblin-d92fbdc4ea23ed5bc4f439358d83bee01b76b964.tar.xz
mediagoblin-d92fbdc4ea23ed5bc4f439358d83bee01b76b964.zip
Add (failing) test for editing the slug.
This test fails, because it tries to set a slug with an "=" in it. And tests that the "=" gets replaced by "-". Well, it currently is not being replaced. The next (cherry picked) commit by Sebastian Spaeth fixes this test!
-rw-r--r--mediagoblin/tests/test_submission.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mediagoblin/tests/test_submission.py b/mediagoblin/tests/test_submission.py
index 606c0e27..00f1ed3d 100644
--- a/mediagoblin/tests/test_submission.py
+++ b/mediagoblin/tests/test_submission.py
@@ -161,11 +161,17 @@ class TestSubmission:
media = self.check_media(request, {'title': u'Balanced Goblin'}, 1)
media_id = media.id
- # At least render the edit page
+ # render and post to the edit page.
edit_url = request.urlgen(
'mediagoblin.edit.edit_media',
user=self.test_user.username, media_id=media_id)
self.test_app.get(edit_url)
+ self.test_app.post(edit_url,
+ {'title': u'Balanced Goblin',
+ 'slug': u"Balanced=Goblin",
+ 'tags': u''})
+ media = self.check_media(request, {'title': u'Balanced Goblin'}, 1)
+ assert_equal(media.slug, u"balanced-goblin")
# Add a comment, so we can test for its deletion later.
self.check_comments(request, media_id, 0)