PageRenderTime 24ms CodeModel.GetById 20ms 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
  1. package general
  2. import org.junit.*
  3. import grails.test.mixin.*
  4. @TestFor(OrganizacionController)
  5. @Mock(Organizacion)
  6. class OrganizacionControllerTests {
  7. @Test
  8. void testIndex() {
  9. controller.index()
  10. assert "/organizacion/lista" == response.redirectedUrl
  11. }
  12. @Test
  13. void testList() {
  14. def model = controller.lista()
  15. assert model.organizaciones.size() == 0
  16. assert model.totalDeOrganizaciones == 0
  17. }
  18. }