Last change
on this file since 1261 was
1261,
checked in by s.h.sikkema@…, 13 years ago
|
Changed jumbar layout to simple iframe for modules
|
-
Property svn:keywords set to
Author Date Rev
|
File size:
767 bytes
|
Line | |
---|
1 | package dbnp.studycapturing |
---|
2 | import grails.test.* |
---|
3 | |
---|
4 | class StudyControllerTests extends ControllerUnitTestCase { |
---|
5 | protected void setUp() { |
---|
6 | |
---|
7 | super.setUp() |
---|
8 | mockDomain(Study, [ new Study(id: 1, assays: [[id:1, name:'assay1'], [id:2, name:'assay2']]), |
---|
9 | new Study(id: 2, assays: [])]) |
---|
10 | |
---|
11 | } |
---|
12 | |
---|
13 | protected void tearDown() { |
---|
14 | super.tearDown() |
---|
15 | } |
---|
16 | |
---|
17 | void testAjaxGetAssays() { |
---|
18 | |
---|
19 | mockParams.id = 1 |
---|
20 | controller.ajaxGetAssays() |
---|
21 | assertEquals '[{"name":"assay1","id":1},{"name":"assay2","id":2}]', mockResponse.contentAsString |
---|
22 | } |
---|
23 | |
---|
24 | |
---|
25 | void testAjaxGetAssaysEmptyList() { |
---|
26 | |
---|
27 | mockParams.id = 2 |
---|
28 | controller.ajaxGetAssays() |
---|
29 | assertEquals '[]', mockResponse.contentAsString |
---|
30 | } |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.