dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41615
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21216: Added tests for forLoop filter
------------------------------------------------------------
revno: 21216
committer: Jiju K Jose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-11-27 10:49:01 +0100
message:
Added tests for forLoop filter
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters/dhis2.angular.filters.test.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters/dhis2.angular.filters.test.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters/dhis2.angular.filters.test.js 2015-11-27 09:26:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters/dhis2.angular.filters.test.js 2015-11-27 09:49:01 +0000
@@ -8,7 +8,6 @@
describe('d2Filter: trimquotesFilter', () => {
let trimquotesFilter;
-
beforeEach(inject(($injector) => {
trimquotesFilter = $injector.get('trimquotesFilter');
}));
@@ -25,7 +24,6 @@
describe('d2Filter: trimvariablequalifiers', () => {
let trimvariablequalifiersFilter;
-
beforeEach(inject(($injector) => {
trimvariablequalifiersFilter = $injector.get('trimvariablequalifiersFilter');
}));
@@ -43,4 +41,16 @@
});
});
+
+ describe('d2Filter: forLoop', () => {
+ let forLoopFilter;
+
+ beforeEach(inject(($injector) => {
+ forLoopFilter = $injector.get('forLoopFilter');
+ }));
+
+ it('should return an array with elements from start to end', function() {
+ expect(forLoopFilter(2,3,10).toString()).to.equal([3,4,5,6,7,8,9].toString());
+ });
+ });
});
\ No newline at end of file