]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/ui/default/staff/test/unit/egGrid.js
LP#1472787: add regression test
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / test / unit / egGrid.js
1 'use strict';
2
3 describe('egGridColumnsProvider', function(){
4     beforeEach(module('egCoreMod'));
5     beforeEach(module('egGridMod'));
6
7     it('expand eg-grid-field wildcard paths', inject(function(egGridColumnsProvider, egIDL) {
8         egIDL.parseIDL();
9         var cols = egGridColumnsProvider.instance({
10            idlClass : "circ" 
11         });
12         cols.expandPath({
13             path : "*"
14         });
15         // the next two are regression tests for LP#1472787
16         expect(cols.indexOf("grace_period")).not.toBe(-1);
17         expect(cols.indexOf(".grace_period")).toBe(-1);
18         cols.expandPath({
19             path : "usr.*"
20         });
21         expect(cols.indexOf("usr.family_name")).not.toBe(-1);
22     }));
23 });