mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add regression test for HTML content in rails-ujs
See discussion in #32287
This commit is contained in:
parent
2674fe38eb
commit
34fc4dee39
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue