Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 78c0537

Browse files
committed
http redirection: added a test
1 parent 45ddb28 commit 78c0537

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/util.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ describe('.util', () => {
107107
done()
108108
})
109109
})
110+
111+
it('.urlAdd http with redirection', (done) => {
112+
ipfs.util.addFromURL('http://covers.openlibrary.org/book/id/969165.jpg', (err, result) => {
113+
expect(result[0].hash).to.equal('QmaL9zy7YUfvWmtD5ZXp42buP7P4xmZJWFkm78p8FJqgjg')
114+
done()
115+
})
116+
})
110117
})
111118

112119
describe('Promise API', () => {})

0 commit comments

Comments
 (0)