Remove references to $rootScope.Shared & .Content in non-view code.

Instead, have them request services that return them so tests don’t need to prepare special state.
This commit is contained in:
Andrew Bloomgarden
2014-01-12 15:05:15 -08:00
parent 77801e458e
commit dc368bb652
14 changed files with 65 additions and 58 deletions

View File

@@ -8,8 +8,7 @@ describe('userServices', function() {
beforeEach(function(){
module(function($provide){
var habitrpgShared = {helpers: {newUser: sinon.spy()}};
$window = {href: '', alert: sinon.spy(), location: {search: '', pathname: ''}, habitrpgShared: habitrpgShared};
$window = {href: '', alert: sinon.spy(), location: {search: '', pathname: ''}};
$provide.value('$window', $window);
});
@@ -48,4 +47,4 @@ describe('userServices', function() {
//TODO where does that null comes from?
expect(user.settings.sync.queue).to.eql([null, {}]);
});
});
});