@@ -24,15 +24,15 @@ describe('PDF Generator', function() {
2424
2525 it ( 'should call html-pdf-chrome with the correct options' , function ( ) {
2626 var options = { options : true }
27- generator = createGenerator ( 'storage' , options ) ( 'url' )
27+ generator = createGenerator ( 'storage' , options ) ( 'url' , { id : 1 } )
2828
2929 if ( ! createStub . calledOnce || ! createStub . calledWith ( 'url' , options ) ) {
3030 throw new Error ( 'Correct options not passed' )
3131 }
3232 } )
3333
3434 it ( 'should attempt to write pdf to storage' , function ( done ) {
35- generator ( 'url' ) . then ( ( ) => {
35+ generator ( 'url' , { id : 1 } ) . then ( ( ) => {
3636 if ( ! pdf . toFile . calledOnce || ! pdf . toFile . args [ 0 ] [ 0 ] . match ( / s t o r a g e \/ p d f \/ ( .+ ) \. p d f $ / ) ) {
3737 throw new Error ( 'PDF was not attempted to saved' )
3838 }
@@ -51,7 +51,7 @@ describe('PDF Generator', function() {
5151 }
5252 }
5353
54- createGenerator ( 'storage' , { } , storage ) ( 'url' ) . then ( response => {
54+ createGenerator ( 'storage' , { } , storage ) ( 'url' , { id : 1 } ) . then ( response => {
5555 var storage = response . storage
5656
5757 if ( storage . storage_1 . path !== 'file_1' || storage . storage_2 . path !== 'file_2' ) {
@@ -65,7 +65,7 @@ describe('PDF Generator', function() {
6565 it ( 'should return error response thrown promises' , function ( done ) {
6666 createStub . onCall ( 0 ) . returns ( new Promise ( ( resolve , reject ) => reject ( 'error' ) ) )
6767
68- createGenerator ( 'storage' , { } , { } ) ( 'url' ) . then ( response => {
68+ createGenerator ( 'storage' , { } , { } ) ( 'url' , { id : 1 } ) . then ( response => {
6969 if ( ! error . isError ( response ) ) {
7070 throw new Exception ( 'Generator rejection did not resolve in error promise' )
7171 }
0 commit comments