Merge pull request #20185 from civicrm/5.37
[civicrm-core.git] / tests / karma / unit / crmMailingSpec.js
CommitLineData
416abe87
PH
1'use strict';
2
3describe('crmMailing', function() {
4
5 beforeEach(function() {
a8e65974 6 module('crmUtil');
416abe87
PH
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) {
da8f0cf5 17 $provide.value('crmNavigator', navigator);
416abe87
PH
18 });
19 inject(['crmLegacy', function(crmLegacy) {
6225e1f6 20 crmLegacy.url({back: '/civicrm/placeholder-url-path?civicrm-placeholder-url-query=1', front: '/civicrm/placeholder-url-path?civicrm-placeholder-url-query=1'});
416abe87
PH
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});