justinhelmer
12/16/2015 - 12:41 AM

unit.js

(function (helpers) {
  'use strict';

  describe('authenticated.integrations.myCoolService', function () {
    var serviceDependency1, serviceDependency2;
    var myCoolService;

    beforeEach(function () {
      module(function($provide) {
        $provide.service('serviceDependency1', helpers.spies.createObj('serviceDependency1', ['method1', 'method2']));
        $provide.service('serviceDependency2', helpers.spies.createObj('serviceDependency2', ['method1', 'method2']));
      });
      
      helpers.injectors.get('app.authenticated.integrations');
      
      inject(function (_serviceDependency1_, _serviceDependency2_, _myCoolService_) {
        serviceDependency1 = _serviceDependency1_;
        serviceDependency2 = _serviceDependency2_;
        myCoolService = _myCoolService_
      });
    });

    it('should call some dependency method', function () {
      expect(serviceDependency1.method1).toHaveBeenCalled();
    });
  });

})(window.unitTestHelpers);