PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/unit/general/OrganizacionControllerTests.groovy

http://github.com/jdmr/mateo
Groovy | 30 lines | 18 code | 12 blank | 0 comment | 3 complexity | 85045a7f135170391d5d3b48f185e0e1 MD5 | raw file
 1package general
 2
 3
 4
 5import org.junit.*
 6import grails.test.mixin.*
 7
 8
 9@TestFor(OrganizacionController)
10@Mock(Organizacion)
11class OrganizacionControllerTests {
12
13
14    @Test
15    void testIndex() {
16        controller.index()
17        assert "/organizacion/lista" == response.redirectedUrl
18    }
19
20    @Test
21    void testList() {
22
23        def model = controller.lista()
24
25        assert model.organizaciones.size() == 0
26        assert model.totalDeOrganizaciones == 0
27
28    }
29
30}