@@ -49,7 +49,7 @@ describe('Execute', function() {
4949 return this . api . execute ( 'foo' , 'bar' , 'baz' ) . then ( function ( ) {
5050 const [ url , opts ] = fetchMock . lastCall ( 'execute' )
5151 should ( url ) . endWith ( 'foo/bar/baz' )
52- should ( opts . body ) . equal ( '' )
52+ should ( opts . body ) . equal ( '{} ' )
5353 should ( opts . method ) . equal ( 'POST' )
5454 } )
5555 } )
@@ -58,7 +58,7 @@ describe('Execute', function() {
5858 return this . api . execute ( 'foo' , 'bar' , 'baz' , { foo : 'barbaz' } ) . then ( function ( ) {
5959 const [ url , opts ] = fetchMock . lastCall ( 'execute' )
6060 should ( url ) . endWith ( 'foo/bar/baz' )
61- should ( opts . body ) . containEql ( 'foo= barbaz' )
61+ should ( opts . body ) . containEql ( '{" foo":" barbaz"} ' )
6262 should ( opts . method ) . equal ( 'POST' )
6363 } )
6464 } )
@@ -67,9 +67,9 @@ describe('Execute', function() {
6767 return this . api . execute ( 'foo' , null , 'baz' , { foo : 'barbaz' } ) . then ( function ( ) {
6868 const [ url , opts ] = fetchMock . lastCall ( 'execute' )
6969 should ( url ) . endWith ( 'foo' )
70- should ( opts . body ) . containEql ( 'action= baz' )
71- should ( opts . body ) . containEql ( 'foo= barbaz' )
72- should ( opts . body ) . containEql ( 'method= PUT' )
70+ should ( opts . body ) . containEql ( '" action":" baz" ' )
71+ should ( opts . body ) . containEql ( '" foo":" barbaz" ' )
72+ should ( opts . body ) . containEql ( '" method":" PUT" ' )
7373 should ( opts . method ) . equal ( 'POST' )
7474 } )
7575 } )
@@ -78,9 +78,9 @@ describe('Execute', function() {
7878 return this . api . execute ( 'foo' , null , 'baz' ) . then ( function ( ) {
7979 const [ url , opts ] = fetchMock . lastCall ( 'execute' )
8080 should ( url ) . endWith ( 'foo' )
81- should ( opts . body ) . containEql ( 'action= baz' )
81+ should ( opts . body ) . containEql ( '" action":" baz" ' )
8282 should ( opts . method ) . equal ( 'POST' )
83- should ( opts . body ) . containEql ( 'method= PUT' )
83+ should ( opts . body ) . containEql ( '" method":" PUT" ' )
8484 } )
8585 } )
8686} )
0 commit comments