diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-10-25 21:10:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-25 21:10:37 +0900 |
commit | 731ea4e3fb7250a28c55c664aff43459d83cdec1 (patch) | |
tree | 86a1e8e1e6e257d1537b3cd0ce12be0856a572a4 /actionview/test/ujs | |
parent | 0beb22d6d15cb639c131bc135bc917112581ccd6 (diff) | |
parent | a5d80d4a1c4a41ec92985e34cac23bac0509e7fb (diff) | |
download | rails-731ea4e3fb7250a28c55c664aff43459d83cdec1.tar.gz rails-731ea4e3fb7250a28c55c664aff43459d83cdec1.tar.bz2 rails-731ea4e3fb7250a28c55c664aff43459d83cdec1.zip |
Merge pull request #30513 from y-yagi/fix_30444
Does not include disabled element in params
Diffstat (limited to 'actionview/test/ujs')
-rw-r--r-- | actionview/test/ujs/public/test/data-remote.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/test/ujs/public/test/data-remote.js b/actionview/test/ujs/public/test/data-remote.js index 9bbefc18f2..cbbd4e6c92 100644 --- a/actionview/test/ujs/public/test/data-remote.js +++ b/actionview/test/ujs/public/test/data-remote.js @@ -191,9 +191,10 @@ asyncTest('submitting form with data-remote attribute should include inputs in a .triggerNative('submit') }) -asyncTest('submitting form with data-remote attribute submits input with matching [form] attribute', 5, function() { +asyncTest('submitting form with data-remote attribute submits input with matching [form] attribute', 6, function() { $('#qunit-fixture') .append($('<input type="text" name="user_data" value="value1" form="my-remote-form">')) + .append($('<input type="text" name="user_email" value="from@example.com" disabled="disabled" form="my-remote-form">')) $('form[data-remote]') .bindNative('ajax:success', function(e, data, status, xhr) { @@ -201,6 +202,7 @@ asyncTest('submitting form with data-remote attribute submits input with matchin App.assertRequestPath(data, '/echo') equal(data.params.user_name, 'john', 'ajax arguments should have key user_name with right value') equal(data.params.user_data, 'value1', 'ajax arguments should have key user_data with right value') + equal(data.params.user_email, undefined, 'ajax arguments should not have disabled field') App.assertPostRequest(data) }) .bindNative('ajax:complete', function() { start() }) |