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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -