Skip to content

Commit 34a7c10

Browse files
author
Eirini
committed
fix: fixed unit tests
1 parent 433c0df commit 34a7c10

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

test/tinify-source-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe("Source", function() {
6262

6363
it("should return source with data", function() {
6464
nock("https://api.tinify.com")
65-
.post("/some/location")
65+
.get("/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-
.post("/some/location")
89+
.get("/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-
.post("/some/location")
115+
.get("/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-
.post("/some/location")
142+
.get("/some/location")
143143
.reply(200, "compressed file")
144144
})
145145

@@ -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-
.post("/some/location")
260+
.get("/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-
.post("/some/location")
279+
.get("/some/location")
280280
.reply(200, "compressed file")
281281
})
282282

test/tinify-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ describe("tinify", function() {
192192
.reply(201, {}, {Location: "https://api.tinify.com/some/location"})
193193

194194
nock("https://api.tinify.com")
195-
.post("/some/location")
195+
.get("/some/location")
196196
.reply(200, "compressed file")
197197
})
198198

@@ -215,7 +215,7 @@ describe("tinify", function() {
215215
.reply(201, {}, {Location: "https://api.tinify.com/some/location"})
216216

217217
nock("https://api.tinify.com")
218-
.post("/some/location")
218+
.get("/some/location")
219219
.reply(200, "compressed file")
220220
})
221221

@@ -238,7 +238,7 @@ describe("tinify", function() {
238238
.reply(201, {}, {Location: "https://api.tinify.com/some/location"})
239239

240240
nock("https://api.tinify.com")
241-
.post("/some/location")
241+
.get("/some/location")
242242
.reply(200, "compressed file")
243243
})
244244

0 commit comments

Comments
 (0)