update change log

This commit is contained in:
Leo Horie 2014-09-25 07:25:26 -04:00
parent 75d7221d06
commit 75787a1483
2 changed files with 9 additions and 1 deletions

View file

@ -20,6 +20,7 @@
- fixed incorrect diff when document is root, and html element is omitted
- fixed querystring clobbering in links w/ config:m.route [#261](https://github.com/lhorie/mithril.js/issues/261)
- fixed rare bug that made events get dropped [#214](https://github.com/lhorie/mithril.js/issues/214)
- don't send Content-Type header if there's no request data [#280](https://github.com/lhorie/mithril.js/issues/280)
---

View file

@ -1553,11 +1553,18 @@ function testMithril(mock) {
})
test(function() {
var error = m.prop("no error")
var prop = m.request({method: "POST", url: "test"}).then(null, error)
var prop = m.request({method: "POST", url: "test", data: {foo: 1}}).then(null, error)
var xhr = mock.XMLHttpRequest.$instances.pop()
xhr.onreadystatechange()
return xhr.$headers["Content-Type"] == "application/json; charset=utf-8"
})
test(function() {
var error = m.prop("no error")
var prop = m.request({method: "POST", url: "test"}).then(null, error)
var xhr = mock.XMLHttpRequest.$instances.pop()
xhr.onreadystatechange()
return xhr.$headers["Content-Type"] === undefined
})
// m.request over jsonp
test(function(){