From af212fa530d5ff24ba578e3061ff745113b03ea1 Mon Sep 17 00:00:00 2001 From: Phil Eberhardt Date: Sat, 11 Jul 2015 22:11:55 -0400 Subject: [PATCH] added test for #3564 fix --- tests/data/array-tests.js | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/data/array-tests.js b/tests/data/array-tests.js index 4107be2d..6096ecfa 100644 --- a/tests/data/array-tests.js +++ b/tests/data/array-tests.js @@ -21,6 +21,21 @@ var arrayOptions = new Options({ ] }); +var extraOptions = new Options ({ + data: [ + { + id: 'default', + text: 'Default', + extra: true + }, + { + id: 'One', + text: 'One', + extra: true + } + ] +}); + var nestedOptions = new Options({ data: [ { @@ -206,6 +221,36 @@ test('option tags are automatically generated', function (assert) { ); }); +test('option tags can receive new data', function(assert) { + var $select = $('#qunit-fixture .single'); + + var data = new ArrayData($select, extraOptions); + + assert.equal( + $select.find('option').length, + 2, + 'Only one more