dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41605
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21209: Ädded new file with tests for the filters
------------------------------------------------------------
revno: 21209
committer: Jiju K Jose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-11-27 09:51:37 +0100
message:
Ädded new file with tests for the filters
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters/
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
=== added directory 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/test/filters'
=== added 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 1970-01-01 00:00:00 +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 08:51:37 +0000
@@ -0,0 +1,19 @@
+const {module, inject} = angular.mock;
+const {spy} = sinon;
+describe('Filters: d2Filters', () => {
+
+ beforeEach(module('d2Filters'));
+
+ describe('d2Filter: trimquotesFilter', () => {
+ let trimquotesFilter;
+ beforeEach(inject(($injector) => {
+ trimquotesFilter = $injector.get('trimquotesFilter');
+ }));
+
+ it('should trim the initial single and double quotes', function() {
+ var trimmedString = trimquotesFilter('"testString"');
+ expect(trimmedString).to.equal('testString');
+ });
+
+ });
+});
\ No newline at end of file