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

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 3863a76 point at it.

Merge branch 'flash'visionmediabefore adoption3863a76

lines 1–27why, 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'11 it 'should consider _method as the HTTP method'12 put('/user', function(){13 return 'updated user'14 })15 post('/user', { body: '_method=put', headers: { 'content-type': 'application/x-www-form-urlencoded' }}).body.should.eql 'updated user'16 end17 18 it 'should force _method to lowercase to conform to internal uses'19 put('/user', function(){20 return 'updated user'21 })22 post('/user', { body: '_method=PUT', headers: { 'content-type': 'application/x-www-form-urlencoded' }}).body.should.eql 'updated user'23 end24 end25 end26 end27end