Changeset 502 for trunk/test
- Timestamp:
- May 31, 2010, 1:53:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/dbnp/studycapturing/WizardControllerTests.groovy
r496 r502 12 12 } 13 13 14 void testSomething() { 14 void testAjaxParseRelTimeNonExistent() { 15 // Without parameters, the method should give an error 16 controller.ajaxParseRelTime(); 17 assert controller.response.status == 400; 18 } 15 19 20 void testAjaxParseRelTimeEmpty() { 21 // With empty parameter, the method should work 22 controller.params.reltime = ''; 23 controller.ajaxParseRelTime(); 24 assert controller.response.status == 200 25 assert controller.response.contentAsString == "" 16 26 } 27 28 void testAjaxParseRelTimeCorrect() { 29 // With simple parameter, the method should work 30 controller.params.reltime = '3d'; 31 controller.ajaxParseRelTime(); 32 assert controller.response.status == 200 33 assert controller.response.contentAsString == "3 days" 34 } 35 36 void testAjaxParseRelTimeIllegal() { 37 // With illegal parameter, the method should give status code 400 38 controller.params.reltime = 'no valid reltime'; 39 controller.ajaxParseRelTime(); 40 assert controller.response.status == 400; 41 } 42 17 43 }
Note: See TracChangeset
for help on using the changeset viewer.