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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -