Skip to content
Myr

downloads.js

This file

Path

test/acceptance/downloads.js

47 lines · 1.2 KiB · JavaScript

Last changed by

landed by oscabriela419aa7

History of this file

Take it

The walk stopped after 200 commits: lines older than 2027b87 point at it.

fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87

lines 1–17why, one step back
1
2var app = require('../../examples/downloads')3 , request = require('supertest');45describe('downloads', function(){6 describe('GET /', function(){7 it('should have a link to amazing.txt', function(done){8 request(app)9 .get('/')10 .expect(/href="\/files\/amazing.txt"/, done)11 })12 })1314 describe('GET /files/notes/groceries.txt', function () {15 it('should have a download header', function (done) {16 request(app)17 .get('/files/notes/groceries.txt')

Upgrade `content-disposition` (#7233)Blake Embreybefore adoption59e205a

line 18why, one step back
18 .expect('Content-Disposition', 'attachment; filename=groceries.txt')

fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87

lines 19–26why, one step back
19 .expect(200, done)
20 })21 })2223 describe('GET /files/amazing.txt', function(){24 it('should have a download header', function(done){25 request(app)26 .get('/files/amazing.txt')

Upgrade `content-disposition` (#7233)Blake Embreybefore adoption59e205a

line 27why, one step back
27 .expect('Content-Disposition', 'attachment; filename=amazing.txt')

fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87

lines 28–41why, one step back
28 .expect(200, done)
29 })30 })3132 describe('GET /files/missing.txt', function(){33 it('should respond with 404', function(done){34 request(app)35 .get('/files/missing.txt')36 .expect(404, done)37 })38 })3940 describe('GET /files/../index.js', function () {41 it('should respond with 403', function (done) {42 request(app)43 .get('/files/../index.js')

fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87

lines 44–47why, one step back
44 .expect(403, done)
45 })46 })47})