|
|
@ -23,18 +23,15 @@ class PricingTestCase(BaseTestCase): |
|
|
|
assert Subscription.objects.count() == 0 |
|
|
|
|
|
|
|
@override_settings(USE_PAYMENTS=True) |
|
|
|
def test_pricing_is_hidden_for_team_members(self): |
|
|
|
def test_pricing_is_visible_for_all(self): |
|
|
|
for email in ("[email protected]", "[email protected]"): |
|
|
|
self.client.login(username=email, password="password") |
|
|
|
|
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
|
|
|
|
r = self.client.get("/about/") |
|
|
|
# Bob should not see pricing tab, as bob is currently on |
|
|
|
# Alice's team, but is not its owner. |
|
|
|
self.assertNotContains(r, "Pricing") |
|
|
|
r = self.client.get("/about/") |
|
|
|
self.assertContains(r, "Pricing") |
|
|
|
|
|
|
|
@override_settings(USE_PAYMENTS=True) |
|
|
|
def test_pricing_is_visible_for_team_owners(self): |
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
def test_it_offers_to_switch(self): |
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
|
|
|
|
r = self.client.get("/about/") |
|
|
|
self.assertContains(r, "Pricing") |
|
|
|
r = self.client.get("/pricing/") |
|
|
|
self.assertContains(r, "To manage this team") |