| 1 | 'use strict'; |
| 2 | |
| 3 | describe('crmMailing', function() { |
| 4 | |
| 5 | beforeEach(function() { |
| 6 | module('crmUtil'); |
| 7 | module('crmMailing'); |
| 8 | }); |
| 9 | |
| 10 | describe('ListMailingsCtrl', function() { |
| 11 | var ctrl; |
| 12 | var navigator; |
| 13 | |
| 14 | beforeEach(function() { |
| 15 | navigator = jasmine.createSpyObj('crmNavigator', ['redirect']); |
| 16 | module(function ($provide) { |
| 17 | $provide.value('crmNavigator', navigator); |
| 18 | }); |
| 19 | inject(['crmLegacy', function(crmLegacy) { |
| 20 | crmLegacy.url({back: '/civicrm-placeholder-url-path?civicrm-placeholder-url-query=1', front: '/civicrm-placeholder-url-path?civicrm-placeholder-url-query=1'}); |
| 21 | }]); |
| 22 | inject(['$controller', function($controller) { |
| 23 | ctrl = $controller('ListMailingsCtrl', {}); |
| 24 | }]); |
| 25 | }); |
| 26 | |
| 27 | it('should redirect to unscheduled', function() { |
| 28 | expect(navigator.redirect).toHaveBeenCalled(); |
| 29 | }); |
| 30 | }); |
| 31 | }); |