@@ -62,7 +62,7 @@ describe("Source", function() {
6262
6363 it ( "should return source with data" , function ( ) {
6464 nock ( "https://api.tinify.com" )
65- . get ( "/some/location" )
65+ . post ( "/some/location" )
6666 . reply ( 200 , "compressed file" )
6767
6868 const data = tinify . Source . fromFile ( dummyFile ) . toBuffer ( )
@@ -86,7 +86,7 @@ describe("Source", function() {
8686
8787 it ( "should return source with data" , function ( ) {
8888 nock ( "https://api.tinify.com" )
89- . get ( "/some/location" )
89+ . post ( "/some/location" )
9090 . reply ( 200 , "compressed file" )
9191
9292 const data = tinify . Source . fromBuffer ( "png file" ) . toBuffer ( )
@@ -112,7 +112,7 @@ describe("Source", function() {
112112 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
113113
114114 nock ( "https://api.tinify.com" )
115- . get ( "/some/location" )
115+ . post ( "/some/location" )
116116 . reply ( 200 , "compressed file" )
117117
118118 const data = tinify . Source . fromUrl ( "http://example.com/test.jpg" ) . toBuffer ( )
@@ -139,7 +139,7 @@ describe("Source", function() {
139139 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
140140
141141 nock ( "https://api.tinify.com" )
142- . get ( "/some/location" )
142+ . post ( "/some/location" )
143143 . reply ( 200 , "compressed file" )
144144 } )
145145
@@ -156,7 +156,7 @@ describe("Source", function() {
156156 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
157157
158158 nock ( "https://api.tinify.com" )
159- . get ( "/some/location" , '{"preserve":["copyright","location"]}' )
159+ . post ( "/some/location" , '{"preserve":["copyright","location"]}' )
160160 . reply ( 200 , "copyrighted file" )
161161 } )
162162
@@ -181,7 +181,7 @@ describe("Source", function() {
181181
182182 it ( "should include other options if set" , function ( ) {
183183 nock ( "https://api.tinify.com" )
184- . get ( "/some/location" , '{"preserve":["copyright","location"],"resize":{"width":400}}' )
184+ . post ( "/some/location" , '{"preserve":["copyright","location"],"resize":{"width":400}}' )
185185 . reply ( 200 , "copyrighted resized file" )
186186
187187 const data = tinify . Source . fromBuffer ( "png file" ) . resize ( { width : 400 } ) . preserve ( "copyright" , "location" ) . toBuffer ( )
@@ -198,7 +198,7 @@ describe("Source", function() {
198198 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
199199
200200 nock ( "https://api.tinify.com" )
201- . get ( "/some/location" , '{"resize":{"width":400}}' )
201+ . post ( "/some/location" , '{"resize":{"width":400}}' )
202202 . reply ( 200 , "small file" )
203203 } )
204204
@@ -257,7 +257,7 @@ describe("Source", function() {
257257 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
258258
259259 nock ( "https://api.tinify.com" )
260- . get ( "/some/location" )
260+ . post ( "/some/location" )
261261 . reply ( 200 , "compressed file" )
262262 } )
263263
@@ -276,7 +276,7 @@ describe("Source", function() {
276276 . reply ( 201 , { } , { location : "https://api.tinify.com/some/location" } )
277277
278278 nock ( "https://api.tinify.com" )
279- . get ( "/some/location" )
279+ . post ( "/some/location" )
280280 . reply ( 200 , "compressed file" )
281281 } )
282282
0 commit comments