User: Add tests for @user list --capability.

This commit is contained in:
Valentin Lorentz 2012-10-29 19:28:59 +01:00
parent 929090c279
commit 88b2b235ff
1 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,7 @@ import supybot.world as world
import supybot.ircdb as ircdb
class UserTestCase(PluginTestCase):
plugins = ('User',)
plugins = ('User', 'Admin')
prefix1 = 'somethingElse!user@host.tld'
prefix2 = 'EvensomethingElse!user@host.tld'
def testHostmaskList(self):
@ -91,6 +91,13 @@ class UserTestCase(PluginTestCase):
self.prefix = self.prefix2
self.assertNotError('register biff quux')
self.assertResponse('user list', 'biff and foo')
self.assertRegexp('user list --capability testcap', 'no matching')
self.assertNotError('admin capability add biff testcap')
self.assertResponse('user list --capability testcap', 'biff')
self.assertNotError('admin capability remove biff testcap')
self.assertRegexp('user list --capability testcap', 'no matching')
self.assertResponse('user list f', 'biff and foo')
self.assertResponse('user list f*', 'foo')
self.assertResponse('user list *f', 'biff')