Skip to content
Myr

spec.plugins.method-override.js

This file

Path

spec/spec.plugins.method-override.js

27 lines · 838 bytes · JavaScript

Last changed by

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2

History of this file

Take it

The walk stopped after 200 commits: lines older than 521fb0b point at it.

Pre-loading view engine modules to prevent overhead of module loadingvisionmediabefore adoption521fb0b

lines 1–10why, one step back
1
2describe 'Express'3 before_each4 reset()5 use(require('express/plugins/method-override').MethodOverride)6 end7 8 describe 'MethodOverride'9 describe 'on'10 describe 'request'

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption99e3130

line 11why, one step back
11 it 'should consider _method as the HTTP method'

Pre-loading view engine modules to prevent overhead of module loadingvisionmediabefore adoption521fb0b

lines 12–14why, one step back
12 put('/user', function(){
13 return 'updated user'14 })

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2

line 15why, one step back
15 post('/user', { body: '_method=put', headers: { 'content-type': 'application/x-www-form-urlencoded' }}).body.should.eql 'updated user'

Pre-loading view engine modules to prevent overhead of module loadingvisionmediabefore adoption521fb0b

lines 16–17why, one step back
16 end
17

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption99e3130

line 18why, one step back
18 it 'should force _method to lowercase to conform to internal uses'

Pre-loading view engine modules to prevent overhead of module loadingvisionmediabefore adoption521fb0b

lines 19–21why, one step back
19 put('/user', function(){
20 return 'updated user'21 })

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2

line 22why, one step back
22 post('/user', { body: '_method=PUT', headers: { 'content-type': 'application/x-www-form-urlencoded' }}).body.should.eql 'updated user'

Pre-loading view engine modules to prevent overhead of module loadingvisionmediabefore adoption521fb0b

lines 23–27why, one step back
23 end
24 end25 end26 end27end