new migration to add wallet applet to dash db table; new views & html to accomodate
This commit is contained in:
@@ -439,3 +439,18 @@ class FooterNavTest(TestCase):
|
||||
[nav] = parsed.cssselect("#id_footer_nav")
|
||||
links = [a.get("href") for a in nav.cssselect("a")]
|
||||
self.assertIn("/gameboard/", links)
|
||||
|
||||
class WalletAppletTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create(email="disco@test.io")
|
||||
self.client.force_login(self.user)
|
||||
Applet.objects.get_or_create(slug="wallet", defaults={"name": "Wallet"})
|
||||
response = self.client.get("/")
|
||||
self.parsed = lxml.html.fromstring(response.content)
|
||||
|
||||
def test_wallet_applet_present_on_dash(self):
|
||||
[_] = self.parsed.cssselect("#id_applet_wallet")
|
||||
|
||||
def test_wallet_applet_has_manage_link(self):
|
||||
[link] = self.parsed.cssselect("#id_applet_wallet a.wallet-manage-link")
|
||||
self.assertEqual(link.get("href"), "/dashboard/wallet/")
|
||||
|
||||
Reference in New Issue
Block a user