From 64631d83c561510579a04ac8317ab644e52ab714 Mon Sep 17 00:00:00 2001 From: Willian Gustavo Veiga Date: Fri, 26 Jul 2019 12:58:22 -0300 Subject: Add test for submitted fields within disabled fieldsets --- actionview/test/ujs/public/test/data-remote.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'actionview') diff --git a/actionview/test/ujs/public/test/data-remote.js b/actionview/test/ujs/public/test/data-remote.js index 16ea114f3b..dbbb383995 100644 --- a/actionview/test/ujs/public/test/data-remote.js +++ b/actionview/test/ujs/public/test/data-remote.js @@ -490,4 +490,22 @@ asyncTest('changing a select option without "data-url" attribute still fires aja setTimeout(function() { start() }, 20) }) +asyncTest('inputs inside disabled fieldset are not submited on remote forms', 3, function() { + $('form') + .append('
\ + \ +
') + .append('
\ + \ +
') + .bindNative('ajax:success', function(e, data, status, xhr) { + equal(data.params.user_name, 'john') + equal(data.params.description, 'A wise man') + equal(data.params.age, undefined) + + start() + }) + .triggerNative('submit') +}) + })() -- cgit v1.2.3