Skip to content

Commit 5b4d3aa

Browse files
Alex Knowlespgrm
Alex Knowles
authored andcommitted
add unit tests (for multiple and single)
1 parent 09a8184 commit 5b4d3aa

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

test/select.spec.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('ui-select tests', function() {
7878
{ name: 'Nicole', email: '[email protected]', group: 'bar', age: 43 },
7979
{ name: 'Natasha', email: '[email protected]', group: 'Baz', age: 54 }
8080
];
81-
81+
8282
scope.peopleObj = {
8383
'1' : { name: 'Adam', email: '[email protected]', age: 12, country: 'United States' },
8484
'2' : { name: 'Amalie', email: '[email protected]', age: 12, country: 'Argentina' },
@@ -221,7 +221,7 @@ describe('ui-select tests', function() {
221221
//uisRepeatParser
222222

223223
it('should parse simple repeat syntax', function() {
224-
224+
225225
var locals = {};
226226
locals.people = [{name: 'Wladimir'}, {name: 'Samantha'}];
227227
locals.person = locals.people[0];
@@ -240,7 +240,7 @@ describe('ui-select tests', function() {
240240
});
241241

242242
it('should parse simple repeat syntax', function() {
243-
243+
244244
var locals = {};
245245
locals.people = [{name: 'Wladimir'}, {name: 'Samantha'}];
246246
locals.person = locals.people[0];
@@ -253,7 +253,7 @@ describe('ui-select tests', function() {
253253
});
254254

255255
it('should parse simple property binding repeat syntax', function() {
256-
256+
257257
var locals = {};
258258
locals.people = [{name: 'Wladimir'}, {name: 'Samantha'}];
259259
locals.person = locals.people[0];
@@ -266,7 +266,7 @@ describe('ui-select tests', function() {
266266
});
267267

268268
it('should parse (key, value) repeat syntax', function() {
269-
269+
270270
var locals = {};
271271
locals.people = { 'WC' : {name: 'Wladimir'}, 'SH' : {name: 'Samantha'}};
272272
locals.person = locals.people[0];
@@ -286,7 +286,7 @@ describe('ui-select tests', function() {
286286
});
287287

288288
it('should parse simple property binding with (key, value) repeat syntax', function() {
289-
289+
290290
var locals = {};
291291
locals.people = { 'WC' : {name: 'Wladimir'}, 'SH' : {name: 'Samantha'}};
292292
locals.person = locals.people['WC'];
@@ -300,7 +300,7 @@ describe('ui-select tests', function() {
300300
});
301301

302302
it('should should accept a "collection expresion" only if its not (key, value) repeat syntax', function() {
303-
303+
304304
var locals = {};
305305
locals.people = { 'WC' : {name: 'Wladimir'}, 'SH' : {name: 'Samantha'}};
306306
locals.person = locals.people['WC'];
@@ -313,7 +313,7 @@ describe('ui-select tests', function() {
313313
});
314314

315315
it('should should throw if "collection expresion" used and (key, value) repeat syntax', function() {
316-
316+
317317
var locals = {};
318318
locals.people = { 'WC' : {name: 'Wladimir'}, 'SH' : {name: 'Samantha'}};
319319
locals.person = locals.people['WC'];
@@ -2140,22 +2140,6 @@ describe('ui-select tests', function() {
21402140
expect($(el).scope().$select.selected.length).toBe(5);
21412141
});
21422142

2143-
it('should split pastes on ENTER (and with undefined tagging function)', function() {
2144-
var el = createUiSelectMultiple({tagging: true, taggingTokens: "ENTER|,"});
2145-
clickMatch(el);
2146-
triggerPaste(el.find('input'), "tag1\ntag2\ntag3");
2147-
2148-
expect($(el).scope().$select.selected.length).toBe(3);
2149-
});
2150-
2151-
it('should split pastes on TAB', function() {
2152-
var el = createUiSelectMultiple({tagging: true, taggingTokens: "TAB|,"});
2153-
clickMatch(el);
2154-
triggerPaste(el.find('input'), "tag1\ttag2\ttag3");
2155-
2156-
expect($(el).scope().$select.selected.length).toBe(3);
2157-
});
2158-
21592143
it('should add an id to the search input field', function () {
21602144
var el = createUiSelectMultiple({inputId: 'inid'});
21612145
var searchEl = $(el).find('input.ui-select-search');

0 commit comments

Comments
 (0)