jasmine/angular inject factory with http into controller fails
| //actual definitions snippets | |
| var app = angular.module('backupsApp', ['ngRoute', 'ngResource']); | |
| app.factory('configurationFactory', function($http) { | |
| app.controller('backupsController', function($scope, $routeParams, configurationFactory) { | |
| //test snippet | |
| describe('configurations', function () { | |
| var $controller; | |
| beforeEach(module('backupsApp')); | |
| beforeEach(inject(function(_$controller_){$controller = _$controller_ ;})); | |
| it('insert new configuration', inject(function ($routeParams, configurationFactory) { | |
| var $scope = {}; | |
| $controller('backupsController', { $scope: $scope, $routeParams: $routeParams, configurationFactory: configurationFactory }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment