Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add (failing) test for syndication support.

  • Loading branch information...
commit b8e0ec66534497a68101c9240c25457585c9b505 1 parent 7530be7
@esteele esteele authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 plone/app/collection/tests/test_collection.py
View
15 plone/app/collection/tests/test_collection.py
@@ -9,6 +9,7 @@
from plone.testing.z2 import Browser
from transaction import commit
from zope.component import getUtility, getMultiAdapter
+from Products.CMFCore.utils import getToolByName
from plone.app.collection.portlets import collectionportlet
from .base import CollectionTestCase, CollectionPortletTestCase
@@ -143,6 +144,18 @@ def test_selectedViewFields(self):
# check if there are selectedViewFields
self.assertTrue(len(collection.selectedViewFields()) > 0)
+ def test_syndication_enabled_by_default(self):
+ portal = self.layer['portal']
+ login(portal, 'admin')
+ # add a collection, so we can add a query to it
+ portal.invokeFactory("Collection",
+ "collection",
+ title="New Collection")
+ collection = portal['collection']
+ syn = getToolByName(portal, 'portal_syndication')
+ self.assertTrue(syn.isSyndicationAllowed(collection))
+
+
class TestCollectionPortlet(CollectionPortletTestCase):
@@ -255,4 +268,4 @@ def testPortlet(self):
# set the target_collection to /, so we should get an empty result
collectionrenderer.data.target_collection = '/'
- self.assertEqual(len(collectionrenderer.results()), 0)
+ self.assertEqual(len(collectionrenderer.results()), 0)
Please sign in to comment.
Something went wrong with that request. Please try again.