From f6c2eac277ba1227469cd92b7d2276fd58b5eaf3 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 9 Oct 2012 17:01:23 +0300
Subject: [PATCH] test RSS generation by testing indirectly its "get" method 
 (new post should be first in list).

---
 product/ERP5/tests/testERP5Discussion.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/product/ERP5/tests/testERP5Discussion.py b/product/ERP5/tests/testERP5Discussion.py
index 0b3a6cbb58..534c92c151 100644
--- a/product/ERP5/tests/testERP5Discussion.py
+++ b/product/ERP5/tests/testERP5Discussion.py
@@ -132,6 +132,13 @@ class TestERP5Discussion(ERP5TypeTestCase):
     self.assertSameSet([discussion_thread_object1], [x.getObject() for x  in web_section1.getDocumentValueList()])
     self.assertSameSet([discussion_thread_object2], [x.getObject() for x  in web_section2.getDocumentValueList()])
 
+    # test RSS generation by testing indirectly its "get" method
+    # (new post should be first in list)
+    current_post_list = list(discussion_thread_object1.objectValues())
+    new_post = discussion_thread_object1.newContent()
+    self.tic()
+    self.assertSameSet([new_post] + current_post_list, web_section1.WebSection_getLatestDiscussionPostList())
+
     # test archiving threads so the do not belong any more to web section document list
     discussion_thread_object1.archive()
     discussion_thread_object2.archive()
-- 
2.30.9