f956ae19580501458d7d188faa6b2d4e14d7bc22
[angular-drzb] / test / unit / filtersSpec.js
1 'use strict';
2
3 /* jasmine specs for filters go here */
4
5 describe('filter', function() {
6   beforeEach(module('myApp.filters'));
7
8
9   describe('interpolate', function() {
10     beforeEach(module(function($provide) {
11       $provide.value('version', 'TEST_VER');
12     }));
13
14
15     it('should replace VERSION', inject(function(interpolateFilter) {
16       expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
17     }));
18   });
19
20   describe('registration_date_time', function() {
21     it('registration.timestamp to GMT ISO time', inject(function(registration_date_timeFilter) {
22       expect(registration_date_timeFilter('registration.135721386441722')).toEqual('2013-01-03 11:51:04');
23     }));
24   });
25 });