From 97cbc5b0cf8005e5fa8275a876f29f7ff7484581 Mon Sep 17 00:00:00 2001 From: Gaurav Munjal Date: Tue, 7 Apr 2015 14:56:55 -0400 Subject: [PATCH] Add test for gatherOptions in JquiWidgetMixin --- tests/unit/mixins/jqui-widget-test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/unit/mixins/jqui-widget-test.js b/tests/unit/mixins/jqui-widget-test.js index a37ca2a..6f5033f 100644 --- a/tests/unit/mixins/jqui-widget-test.js +++ b/tests/unit/mixins/jqui-widget-test.js @@ -3,9 +3,18 @@ import JquiWidgetMixin from 'ember-cli-jquery-ui/mixins/jqui-widget'; module('JquiWidgetMixin'); -// Replace this with your real tests. test('it works', function() { var JquiWidgetObject = Ember.Object.extend(JquiWidgetMixin); var subject = JquiWidgetObject.create(); ok(subject); }); + +test('gathers options', function() { + var JquiWidgetObject = Ember.Object.extend(JquiWidgetMixin, { + uiOptions: ['option1', 'option2'] + }); + var subject = JquiWidgetObject.create(); + var options = subject._gatherOptions(); + ok('option1' in options); + ok('option2' in options); +});