Switch over to using sinon.sandbox in karma specs

This commit is contained in:
Blade Barringer
2015-06-20 14:48:38 -05:00
parent 970b8d4061
commit 944cef4d44
12 changed files with 44 additions and 59 deletions

View File

@@ -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);