mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Switch over to using sinon.sandbox in karma specs
This commit is contained in:
@@ -24,13 +24,13 @@ describe('Root Controller', function() {
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
notification = Notification;
|
||||
sinon.stub(notification, 'text');
|
||||
sinon.stub(notification, 'markdown');
|
||||
sandbox.stub(notification, 'text');
|
||||
sandbox.stub(notification, 'markdown');
|
||||
|
||||
user = specHelper.newUser();
|
||||
User = {user: user};
|
||||
User.save = sinon.spy();
|
||||
User.sync = sinon.spy();
|
||||
User.save = sandbox.spy();
|
||||
User.sync = sandbox.spy();
|
||||
|
||||
$httpBackend.whenGET(/partials/).respond();
|
||||
|
||||
@@ -38,13 +38,6 @@ describe('Root Controller', function() {
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
notification.text.reset();
|
||||
notification.markdown.reset();
|
||||
User.save.reset();
|
||||
User.sync.reset();
|
||||
});
|
||||
|
||||
describe('contribText', function(){
|
||||
it('shows contributor level text', function(){
|
||||
expect(scope.contribText()).to.eql(undefined);
|
||||
|
||||
Reference in New Issue
Block a user