Skip to content

Instantly share code, notes, and snippets.

@tlvince
Created February 27, 2014 12:10
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 tlvince/9248913 to your computer and use it in GitHub Desktop.
Save tlvince/9248913 to your computer and use it in GitHub Desktop.
'use strict';
describe('User controller', function () {
// Load the controller's module
beforeEach(module('lmisChromeApp', 'lmisChromeAppMocks'));
var q;
beforeEach(module(function($provide) {
var storageServiceMock = {
find: function() {
var deferred = q.defer();
deferred.resolve([]);
return deferred.promise;
},
loadFixtures: function() {}
};
$provide.value('storageService', storageServiceMock);
}));
beforeEach(inject(function($q) {
q = $q;
}));
it('should go to the asdasd', function(done) {
inject(function(userFactory) {
userFactory.get('1').then(function(result) {
expect(result.length).toBe(0);
done();
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment