Created
March 22, 2014 05:17
-
-
Save RhinoLance/9701636 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This doesn't work. The test can't find the service | |
angular.module('RhinoLib').service('sqLite', function( $q ) { | |
this.initPromise = null; | |
this.oDb = null; | |
} | |
//This works perfectly. I just renoved the $q parameter for the service | |
angular.module('RhinoLib').service('sqLite', function() { | |
this.initPromise = null; | |
this.oDb = null; | |
} | |
describe('Service sqLite test', function(){ | |
describe('When I try to inject it', function(){ | |
it('gets the service', function(){ | |
var $injector = angular.injector([ 'RhinoLib' ]); | |
var myService = $injector.get( 'sqLite' ); | |
expect( myService).not.toBe(null); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment