Skip to content
Myr

more test refactoring

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent acb502e · Browse files · 1 file+29 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+29 added−5 removed

  • tests:+29 added−5 removed

1 file+29 added−5 removed

modified:test/response.test.js+29 added-5 removed
93 unmodified lines
94 }});9596 assert.response(app,97 { url: '/json?callback=test' },98 { body: '{"foo":"bar"}', status: 201, headers: { 'Content-Type': 'application/json', 'X-Foo': 'baz' }});98 { body: '{"foo":"bar"}'99 , status: 201100 , headers: {101 'Content-Type': 'application/json'102 , 'X-Foo': 'baz'103 }});104105 assert.response(app,106 { url: '/text' },102 { body: 'wahoo', headers: { 'Content-Type': 'text/plain', 'X-Foo': 'bar' }});107 { body: 'wahoo'108 , headers: {109 'Content-Type': 'text/plain'110 , 'X-Foo': 'bar'111 }});112113 assert.response(app,114 { url: '/status' },105 { body: 'Not Found', status: 404, headers: { 'Content-Type': 'text/plain' }});115 { body: 'Not Found'116 , status: 404117 , headers: { 'Content-Type': 'text/plain' }});118119 assert.response(app,120 { url: '/error' },108 { body: 'Oh shit!', status: 500, headers: { 'Content-Type': 'text/plain', 'Content-Length': '8' }});121 { body: 'Oh shit!'122 , status: 500123 , headers: {124 'Content-Type': 'text/plain'125 , 'Content-Length': '8'126 }});127128 assert.response(app,129 { url: '/buffer' },111 { body: 'wahoo!', headers: { 'Content-Type': 'application/octet-stream', 'Content-Length': '6' }});130 { body: 'wahoo!'131 , headers: {132 'Content-Type': 'application/octet-stream'133 , 'Content-Length': '6'134 }});135136 assert.response(app,137 { url: '/noargs' },138 { status: 204 }, function(res){139 assert.equal(undefined, res.headers['content-type']);
377 unmodified lines