Skip to content

Commit

Permalink
Added unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Jul 20, 2018
1 parent 3d8d161 commit f6a7ca2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modoboa_radicale/tests.py
Expand Up @@ -74,6 +74,14 @@ def test_index(self):
response = self.client.get(url)
self.assertContains(response, '<div id="app">')

def test_admin_access(self):
"""Check admin access with no mailbox."""
self.client.login(username="admin", password="password")
url = reverse("modoboa_radicale:calendar_detail_view")
response = self.client.get(url)
self.assertContains(
response, "Permission denied: A mailbox is required")


class AccessRuleTestCase(ModoTestCase):

Expand Down

0 comments on commit f6a7ca2

Please sign in to comment.