From 1167bace78cd3b1a918c1b04f3bac54674eab62b Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Thu, 29 Dec 2016 18:26:27 -0500 Subject: [PATCH] Added tests for case insensitive tag matching This adds a single test for cb9a90457867ffb14c7b1550bb67e872e0a5c2dd. --- tests/data/tags-tests.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/data/tags-tests.js b/tests/data/tags-tests.js index 95b3fdeb..6af8d8a7 100644 --- a/tests/data/tags-tests.js +++ b/tests/data/tags-tests.js @@ -64,6 +64,21 @@ test('white space is trimmed by default', function (assert) { }); }); +test('does not create option if text is same but lowercase', function (assert) { + var data = new SelectTags($('#qunit-fixture .single'), options); + + data.query({ + term: 'one' + }, function (data) { + assert.equal(data.results.length, 1); + + var item = data.results[0]; + + assert.equal(item.id, 'One'); + assert.equal(item.text, 'One'); + }); +}); + test('does not trigger for additional pages', function (assert) { var data = new SelectTags($('#qunit-fixture .single'), options);