Skip to content

Commit

Permalink
fix HomeCtrl test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjwarren committed Feb 16, 2015
1 parent 170dd74 commit caa9477
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/unit/thisissoon-core/controllers/HomeCtrl.js
Expand Up @@ -2,7 +2,7 @@

describe("HomeCtrl", function (){

var scope, rootScope, _timeout, _filter, _cache, _projects, _jobs, _GREETINGS;
var scope, rootScope, _timeout, _filter, _document, _cache, _projects, _jobs, _GREETINGS;

beforeEach(function(){
module("thisissoon.core");
Expand All @@ -17,6 +17,13 @@ describe("HomeCtrl", function (){
_timeout = $injector.get("$timeout");
_filter = $injector.get("$filter");

_document = $injector.get("$document");
_document.duScrollTop = function(left, top){
return {
then: function(fn){ fn.apply(this); }
};
}

_cache = $injector.get("CacheService");
spyOn(_cache, "get");
spyOn(_cache, "put");
Expand Down Expand Up @@ -55,6 +62,7 @@ describe("HomeCtrl", function (){
$rootScope: rootScope,
$timeout: _timeout,
$filter: _filter,
$document: _document,
CacheService: _cache,
projects: _projects,
jobs: _jobs,
Expand Down

0 comments on commit caa9477

Please sign in to comment.