Skip to content

Instantly share code, notes, and snippets.

@alexrothenberg
Forked from climboid/exampel unit test
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexrothenberg/e5b618cfcf6a1b3fa86d to your computer and use it in GitHub Desktop.
Save alexrothenberg/e5b618cfcf6a1b3fa86d to your computer and use it in GitHub Desktop.
'use strict';
describe('Offers : controller', function(){
beforeEach(module('client'));
var $scope,
genericService;
beforeEach(inject(function($rootScope, _genericService_, $controller) {
$scope = $rootScope.$new();
var createController = function() {
return $controller('OffersCtrl', {
$scope: $scope,
genericService : genericService
});
};
controller = createController();
}));
it('should have a fixed slider value', function () {
expect($scope.sliderValue).toEqual(4600);
});
});
//
// The error I get is
// Error: [$injector:unpr] Unknown provider: genericServiceProvider <- genericService
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment