diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-05-03 22:57:56 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-05-03 22:57:56 +0300 |
commit | abe747e4f9becf6a2664db5b6bea17f03bb95d4e (patch) | |
tree | bbd8ad4c7e99edc947b697889667a925b26cbca4 /test/basic.js | |
parent | 93d27b8923366dd5610cde63a82f67d2e8efabff (diff) |
When no trackers specified, use some reasonable defaults
Diffstat (limited to 'test/basic.js')
-rw-r--r-- | test/basic.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/basic.js b/test/basic.js index e56ff67..d9d44c2 100644 --- a/test/basic.js +++ b/test/basic.js @@ -14,7 +14,7 @@ test('client.add/remove: magnet uri, utf-8 string', function (t) { var torrent = client.add('magnet:?xt=urn:btih:' + leavesTorrent.infoHash) t.equal(client.torrents.length, 1) t.equal(torrent.infoHash, leavesTorrent.infoHash) - t.equal(torrent.magnetURI, 'magnet:?xt=urn:btih:' + leavesTorrent.infoHash) + t.ok(torrent.magnetURI.indexOf('magnet:?xt=urn:btih:' + leavesTorrent.infoHash) === 0) client.remove('magnet:?xt=urn:btih:' + leavesTorrent.infoHash) t.equal(client.torrents.length, 0) client.destroy() @@ -40,7 +40,7 @@ test('client.add/remove: info hash, hex string', function (t) { var torrent = client.add(leavesTorrent.infoHash) t.equal(client.torrents.length, 1) t.equal(torrent.infoHash, leavesTorrent.infoHash) - t.equal(torrent.magnetURI, 'magnet:?xt=urn:btih:' + leavesTorrent.infoHash) + t.ok(torrent.magnetURI.indexOf('magnet:?xt=urn:btih:' + leavesTorrent.infoHash) === 0) client.remove(leavesTorrent.infoHash) t.equal(client.torrents.length, 0) client.destroy() @@ -53,7 +53,7 @@ test('client.add/remove: info hash, buffer', function (t) { var torrent = client.add(new Buffer(leavesTorrent.infoHash, 'hex')) t.equal(client.torrents.length, 1) t.equal(torrent.infoHash, leavesTorrent.infoHash) - t.equal(torrent.magnetURI, 'magnet:?xt=urn:btih:' + leavesTorrent.infoHash) + t.ok(torrent.magnetURI.indexOf('magnet:?xt=urn:btih:' + leavesTorrent.infoHash) === 0) client.remove(new Buffer(leavesTorrent.infoHash, 'hex')) t.equal(client.torrents.length, 0) client.destroy() |