mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Switch over to using sinon.sandbox in karma specs
This commit is contained in:
@@ -22,15 +22,12 @@ describe('Hall of Heroes Controller', function() {
|
||||
});
|
||||
|
||||
it('populates contributor input with selected hero id', function(){
|
||||
var loadHero = sinon.spy(scope, "loadHero");
|
||||
var scrollTo = sinon.spy(window, "scrollTo");
|
||||
var loadHero = sandbox.spy(scope, "loadHero");
|
||||
var scrollTo = sandbox.spy(window, "scrollTo");
|
||||
|
||||
scope.populateContributorInput(user._id);
|
||||
expect(scope._heroID).to.eql(user._id);
|
||||
expect(loadHero.callCount).to.eql(1);
|
||||
expect(scrollTo.callCount).to.eql(1);
|
||||
|
||||
scope.loadHero.restore();
|
||||
window.scrollTo.restore();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user