Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Commit

Permalink
add failing test for encode w/ comment field
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Apr 28, 2016
1 parent 9d38e5a commit 600ac91
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/encode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ test('encode', function (t) {

t.end()
})

test('encode w/ comment field', function (t) {
var parsedTorrent = parseTorrentFile(fixtures.leaves.torrent)
parsedTorrent.comment = 'hi there!'

var buf = parseTorrentFile.encode(parsedTorrent)
var doubleParsedTorrent = parseTorrentFile(buf)

t.equal(doubleParsedTorrent.comment, parsedTorrent.comment)
t.end()
})

0 comments on commit 600ac91

Please sign in to comment.