import grails.test.GroovyPagesTestCase class ReceiptAttacherTest extends GroovyPagesTestCase { def lineItemModelService def receiptService void testAttachReceiptFromCreateOrItemizeModal_AttachmentShouldOpenInNewWindow() { //given def file = new File("grails-app/views/receipt/_drawerReceipt.gsp") //when def result = applyTemplate(file.text, [ item: [ lineItemId: 1234, receipt: [ attached: true, mediaType: 'image/jpeg', originalUri: 'some/path', receiptId: 5678, name: 'jason' ] ] ]) //then assertTrue(result.contains('target="_blank"')) } }
Created
August 2, 2012 19:35
-
-
Save jasongonzales23/3239979 to your computer and use it in GitHub Desktop.
Testing GSP's with GroovyPagesTestCase
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment