Grails render template unit test issue -
i've got action in controller:
def dirtymarker() { render(template: '/layouts/modals/marker/dirtymarker') }
and id unit test it. ive been trying lots of possibilities. may seem simple, nothing seems work (grails 2.2.3). know here, testing might not important ive got lots of other methods returns rendered template , dont know how implement test..
seems me should work:
void dirtymarker() { controller.metaclass.render = { map params -> assert params.template == '/layouts/modals/marker/dirtymarker' return 'a' } def result = controller.dirtymarker() assert result == 'a' }
Comments
Post a Comment