registration_date_time to match ISO implementation and IE fallback
[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   xdescribe('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   describe('registration_date_time', function() {
26     it('registration.timestamp to something readable', inject(function(registration_date_timeFilter) {
27       expect(registration_date_timeFilter('registration.135721386441722')).toMatch(/2013/);
28     }));
29   });
30 });