changeset 3560:2d9f1ae98b2a

test_wikidicts: test added for trivial change
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 06 May 2008 17:46:40 +0200
parents 8af17e0d221b
children a70795dd0300
files MoinMoin/PageEditor.py MoinMoin/_tests/test_wikidicts.py
diffstat 2 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Tue May 06 13:21:03 2008 +0200
+++ b/MoinMoin/PageEditor.py	Tue May 06 17:46:40 2008 +0200
@@ -1126,7 +1126,6 @@
             comment = kw.get('comment', u'')
             extra = kw.get('extra', u'')
             trivial = kw.get('trivial', 0)
-
             # write the page file
             mtime_usecs, rev = self._write_file(newtext, action, comment, extra, deleted=deleted)
             self.clean_acl_cache()
--- a/MoinMoin/_tests/test_wikidicts.py	Tue May 06 13:21:03 2008 +0200
+++ b/MoinMoin/_tests/test_wikidicts.py	Tue May 06 17:46:40 2008 +0200
@@ -223,4 +223,24 @@
 
         assert not test_user in members
 
+    def testGroupPageTrivialChange(self):
+        """
+         tests appending a username to a group page by trivial change
+        """
+        request = self.request
+        become_trusted(request)
+
+        test_user = create_random_string(name_len=20, count=1)[0]
+        name =  u" * %s\n" % test_user
+        page = create_page(request, u'UserGroup', name)
+        # next member saved  as trivial change
+        test_user = create_random_string(name_len=20, count=1)[0]
+        name =  u" * %s\n" % test_user
+        page.saveText(name, 0, trivial=1)
+
+        members, groups = request.dicts.expand_group(u'UserGroup')
+        nuke_page(request, u'UserGroup')
+
+        assert test_user in members
+
 coverage_modules = ['MoinMoin.wikidicts']