From 12e2829f61adac8a6b5059c99410a6689811e789 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 7 Oct 2016 07:55:37 +0000 Subject: [PATCH] fix radio unit test --- test/unit/radio.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/radio.js b/test/unit/radio.js index ac707b6b..289f871b 100644 --- a/test/unit/radio.js +++ b/test/unit/radio.js @@ -111,8 +111,8 @@ describe('MaterialRadio', function () { changeEvent.initEvent("change", false, true); // Check that all inputs are in a clean state - Array.prototype.splice.call(document.querySelectorAll('[type="radio"]')).forEach(function(item) { - expect(item.className).to.equal('mdl-radio mdl-js-radio is-upgraded'); + document.querySelectorAll('[type="radio"]').forEach(function(item) { + expect(item.parentElement.className).to.equal('mdl-radio mdl-js-radio is-upgraded'); }); radios[0].MaterialRadio.check(); @@ -125,9 +125,9 @@ describe('MaterialRadio', function () { expect(radios[0].className).to.equal('mdl-radio mdl-js-radio is-upgraded'); // Check the extra radio set to verify things with different names are not touched when changing. - Array.prototype.splice.call(document.querySelectorAll('[type="radio"][name="tester"]')).forEach(function(item) { - expect(item.className).to.equal('mdl-radio mdl-js-radio is-upgraded'); + document.querySelectorAll('[type="radio"][name="tester"]').forEach(function(item) { + expect(item.parentElement.className).to.equal('mdl-radio mdl-js-radio is-upgraded'); }); - + }); });