Commit 414d2f9b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Add test for SubscriptionRequestModule_getTicketFeedUrl

parent 3ae9b2a0
...@@ -1590,3 +1590,24 @@ class TestSubscriptionRequest_processStarted(TestSubscriptionSkinsMixin): ...@@ -1590,3 +1590,24 @@ class TestSubscriptionRequest_processStarted(TestSubscriptionSkinsMixin):
self.tic() self.tic()
self.assertEqual(subscription_request.getSimulationState(), "stopped") self.assertEqual(subscription_request.getSimulationState(), "stopped")
class TestSlapOSSubscriptionRequestModule_getTicketFeedUrl(TestSubscriptionSkinsMixin):
def test_getTicketFeedUrl(self):
module = self.portal.subscription_request_module
self.assertRaises(ValueError, module.SubscriptionRequestModule_getTicketFeedUrl)
person = self.makePerson(user=1)
self.tic()
self.login(person.getUserId())
url = module.SubscriptionRequestModule_getTicketFeedUrl()
self.assertIn('SubscriptionRequestModule_viewSubscriptionRequestListAsRSS', url)
self.assertIn(module.absolute_url(), url)
self.assertIn('access_token_secret', url)
self.assertIn('access_token=', url)
self.assertIn('portal_skin=RSS', url)
self.tic()
# it gives the same URL as before
self.assertEqual(url, module.SubscriptionRequestModule_getTicketFeedUrl())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment