Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

test for 'no resource found'

  • Loading branch information
glyph committed Aug 12, 2011
1 parent d5a4fdd commit c30c9c4f53f3ea0e25f64502819505c539e0df86
Showing with 18 additions and 0 deletions.
  1. +18 −0 calendarserver/webadmin/test/test_resource.py
@@ -132,6 +132,24 @@ def test_resourceSearch(self):
"/admin/?resourceId=users:bob"
)
self.assertEquals(gatherTextNodes(resourceLink), "select")
self.assertNotIn(
"No matches found for resource bob",
gatherTextNodes(document)
)


@inlineCallbacks
def test_noResourceFound(self):
"""
Searching for resources which don't exist should result in an
informative message.
"""
self.expectRecordSearch("bob", [])
document = yield self.renderPage(dict(resourceSearch=["bob"]))
self.assertIn(
"No matches found for resource bob",
gatherTextNodes(document)
)


realmName = 'Fake'

0 comments on commit c30c9c4

Please sign in to comment.
You can’t perform that action at this time.