mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
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:
@@ -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, {}]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user