Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9503)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9507)
@@ -2480,2 +2480,31 @@
         self.browser.open(self.student_path + '/studycourse/200/ctadd')
         self.assertTrue('The requested form is locked' in self.browser.contents)
+
+
+class PublicPagesTests(StudentsFullSetup):
+    # Tests for swebservices
+
+    layer = FunctionalLayer
+
+    def test_paymentrequest(self):
+        payment = createObject('waeup.StudentOnlinePayment')
+        payment.p_category = u'schoolfee'
+        payment.p_session = self.student.current_session
+        payment.p_item = u'My Certificate'
+        payment.p_id = u'anyid'
+        self.student['payments']['anykey'] = payment
+        # Request information about unpaid payment ticket
+        self.browser.open('http://localhost/app/paymentrequest?P_ID=anyid')
+        self.assertEqual(self.browser.contents, '-1')
+        # Request information about paid payment ticket
+        payment.p_state = u'paid'
+        notify(grok.ObjectModifiedEvent(payment))
+        self.browser.open('http://localhost/app/paymentrequest?P_ID=anyid')
+        self.assertEqual(self.browser.contents,
+            'FULL_NAME=Anna Tester&FACULTY=fac1&DEPARTMENT=dep1'
+            '&PAYMENT_ITEM=My Certificate&PAYMENT_CATEGORY=School Fee'
+            '&ACADEMIC_SESSION=2004/2005&MATRIC_NUMBER=234&FEE_AMOUNT=0.0')
+        self.browser.open('http://localhost/app/paymentrequest?NONSENSE=nonsense')
+        self.assertEqual(self.browser.contents, '-1')
+        self.browser.open('http://localhost/app/paymentrequest?P_ID=nonsense')
+        self.assertEqual(self.browser.contents, '-1')
