Skip to content
Myr

Test prefixes

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 6c3d3de · Browse files · 2 files+11 added−11 removed
This commit

State

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

Diff stats

2 files+11 added−11 removed

  • tests:+11 added−11 removed

2 files+11 added−11 removed

modified:test/request.test.js+5 added-5 removed
modified:test/response.test.js+6 added-6 removed
5 unmodified lines
6var express = require('express'),7 Buffer = require('buffer').Buffer;89module.exports = {10 '#send()': function(assert){10 'test #send()': function(assert){11 var app = express.createServer();1213 app.get('/html', function(req, res){14 res.send('<p>test</p>', { 'Content-Language': 'en' });
41 unmodified lines
56 { url: '/buffer' },57 { body: 'wahoo!', headers: { 'Content-Type': 'application/octet-stream' }});58 },59 60 '#contentType': function(assert){60 'test #contentType': function(assert){61 var app = express.createServer();62 63 app.get('/html', function(req, res){64 res.contentType('index.html');
5 unmodified lines
70 { url: '/html' },71 { body: '<p>yay</p>', headers: { 'Content-Type': 'text/html; charset=utf-8' }});72 },73 74 '#attachment': function(assert){74 'test #attachment': function(assert){75 var app = express.createServer();76 77 app.get('/style.css', function(req, res){78 res.attachment();
12 unmodified lines
91 { url: '/style.css' },92 { body: 'some stylezzz', headers: { 'Content-Disposition': 'attachment' }});93 },94 95 '#redirect()': function(assert){95 'test #redirect()': function(assert){96 var app = express.createServer(),97 app2 = express.createServer();98 99 app2.set('home', '/blog');
70 unmodified lines
170 { url: '/user/12' },171 { body: '', headers: { Location: '/user/12/blog' }});172 },173 174 '#sendfile()': function(assert){174 'test #sendfile()': function(assert){175 var app = express.createServer();176 177 app.get('/*', function(req, res, params){178 var file = params.splat[0];
13 unmodified lines
192 { url: '/partials' },193 { body: 'Internal Server Error', status: 500 });194 },195 196 '#download()': function(assert){196 'test #download()': function(assert){197 var app = express.createServer();198 199 app.get('/json', function(req, res, params, next){200 res.download(__dirname + '/fixtures/user.json', 'account.json');
21 unmodified lines