Add regression test for HTML content in rails-ujs
See discussion in #32287
This commit is contained in:
parent
2674fe38eb
commit
34fc4dee39
|
@ -128,6 +128,17 @@ asyncTest('execution of JS code does not modify current DOM', 1, function() {
|
|||
})
|
||||
})
|
||||
|
||||
asyncTest('HTML document should be parsed', 1, function() {
|
||||
buildForm({ method: 'post', 'data-type': 'html' })
|
||||
|
||||
$('form').append('<input type="text" name="content_type" value="text/html">')
|
||||
$('form').append('<input type="text" name="content" value="<p>hello</p>">')
|
||||
|
||||
submit(function(e, data, status, xhr) {
|
||||
ok(data instanceof HTMLDocument, 'returned data should be an HTML document')
|
||||
})
|
||||
})
|
||||
|
||||
asyncTest('XML document should be parsed', 1, function() {
|
||||
buildForm({ method: 'post', 'data-type': 'html' })
|
||||
|
||||
|
|
Loading…
Reference in New Issue