Skip to content
This repository was archived by the owner on Jan 27, 2018. It is now read-only.

Commit 1a695bc

Browse files
committed
Fix test teardown of options
1 parent 9ce6467 commit 1a695bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/multiselect.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('<select multiple selectize>', function() {
6060
describe('with a single value in ng-model', function() {
6161
describe('with a string array of options', function() {
6262
beforeEach(function() {
63-
scope.options = stringOptions;
63+
scope.options = angular.copy(stringOptions);
6464
scope.selection = ['foo'];
6565
createDirective('<select multiple ng-model="selection" ng-options="option for option in options" selectize="{ create:\'true\' }"></select>');
6666
});
@@ -159,7 +159,7 @@ describe('<select multiple selectize>', function() {
159159

160160
describe('with an object array of options', function() {
161161
beforeEach(function() {
162-
scope.options = objectOptions;
162+
scope.options = angular.copy(objectOptions);
163163
scope.selection = ['guid1'];
164164
createDirective('<select multiple ng-model="selection" ng-options="option.value as option.text for option in options" selectize></select>');
165165
});

test/select.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('<select selectize>', function() {
4747

4848
describe('with a string array of options', function() {
4949
beforeEach(function() {
50-
scope.options = stringOptions;
50+
scope.options = angular.copy(stringOptions);
5151
scope.selection = 'foo';
5252
createDirective('<select ng-model="selection" ng-options="option for option in options" selectize></select>');
5353
});
@@ -100,7 +100,7 @@ describe('<select selectize>', function() {
100100

101101
describe('with an object array of options', function() {
102102
beforeEach(function() {
103-
scope.options = objectOptions;
103+
scope.options = angular.copy(objectOptions);
104104
scope.selection = 'guid1';
105105
createDirective('<select ng-model="selection" ng-options="option.value as option.text for option in options" selectize></select>');
106106

0 commit comments

Comments
 (0)