Skip to content

Commit

Permalink
Merge pull request #413 from nfriedly/master
Browse files Browse the repository at this point in the history
rename googledoodle.png to .jpg
  • Loading branch information
mikeal committed Mar 1, 2013
2 parents 5c75621 + dbb9a20 commit a9f2447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
File renamed without changes
10 changes: 5 additions & 5 deletions tests/test-pipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ s.listen(s.port, function () {
if (req.headers['x-oneline-proxy']) {
resp.setHeader('x-oneline-proxy', 'yup')
}
resp.writeHead('200', {'content-type':'image/png'})
fs.createReadStream(path.join(__dirname, 'googledoodle.png')).pipe(resp)
resp.writeHead('200', {'content-type':'image/jpeg'})
fs.createReadStream(path.join(__dirname, 'googledoodle.jpg')).pipe(resp)
})
s.on('/onelineproxy', function (req, resp) {
var x = request('http://localhost:3453/doodle')
Expand All @@ -146,18 +146,18 @@ s.listen(s.port, function () {
check();
})

var doodleWrite = fs.createWriteStream(path.join(__dirname, 'test.png'))
var doodleWrite = fs.createWriteStream(path.join(__dirname, 'test.jpg'))

counter++
request.get('http://localhost:3453/doodle').pipe(doodleWrite)

doodleWrite.on('close', function () {
assert.deepEqual(fs.readFileSync(path.join(__dirname, 'googledoodle.png')), fs.readFileSync(path.join(__dirname, 'test.png')))
assert.deepEqual(fs.readFileSync(path.join(__dirname, 'googledoodle.jpg')), fs.readFileSync(path.join(__dirname, 'test.jpg')))
check()
})

process.on('exit', function () {
fs.unlinkSync(path.join(__dirname, 'test.png'))
fs.unlinkSync(path.join(__dirname, 'test.jpg'))
})

counter++
Expand Down

0 comments on commit a9f2447

Please sign in to comment.