Commit 9bb7e665 authored by Hannah Stepanek's avatar Hannah Stepanek

Replace sandbox.stub() with sinon.stub()

parent 487578c0
...@@ -50,7 +50,6 @@ describe('groups', function() { ...@@ -50,7 +50,6 @@ describe('groups', function() {
let fakeLocalStorage; let fakeLocalStorage;
let fakeRootScope; let fakeRootScope;
let fakeServiceUrl; let fakeServiceUrl;
let sandbox;
beforeEach(function() { beforeEach(function() {
fakeAuth = { fakeAuth = {
...@@ -59,7 +58,6 @@ describe('groups', function() { ...@@ -59,7 +58,6 @@ describe('groups', function() {
fakeFeatures = { fakeFeatures = {
flagEnabled: sinon.stub().returns(false), flagEnabled: sinon.stub().returns(false),
}; };
sandbox = sinon.sandbox.create();
fakeStore = fakeReduxStore( fakeStore = fakeReduxStore(
{ {
...@@ -92,8 +90,8 @@ describe('groups', function() { ...@@ -92,8 +90,8 @@ describe('groups', function() {
fakeSession = sessionWithThreeGroups(); fakeSession = sessionWithThreeGroups();
fakeIsSidebar = true; fakeIsSidebar = true;
fakeLocalStorage = { fakeLocalStorage = {
getItem: sandbox.stub(), getItem: sinon.stub(),
setItem: sandbox.stub(), setItem: sinon.stub(),
}; };
fakeRootScope = { fakeRootScope = {
eventCallbacks: {}, eventCallbacks: {},
...@@ -108,7 +106,7 @@ describe('groups', function() { ...@@ -108,7 +106,7 @@ describe('groups', function() {
} }
}, },
$broadcast: sandbox.stub(), $broadcast: sinon.stub(),
}; };
fakeApi = { fakeApi = {
annotation: { annotation: {
...@@ -117,26 +115,23 @@ describe('groups', function() { ...@@ -117,26 +115,23 @@ describe('groups', function() {
group: { group: {
member: { member: {
delete: sandbox.stub().returns(Promise.resolve()), delete: sinon.stub().returns(Promise.resolve()),
}, },
read: sinon.stub().returns(Promise.resolve()),
}, },
groups: { groups: {
list: sandbox.stub().returns(dummyGroups), list: sinon.stub().returns(dummyGroups),
}, },
profile: { profile: {
groups: { groups: {
read: sandbox.stub().returns(Promise.resolve([dummyGroups[0]])), read: sinon.stub().returns(Promise.resolve([dummyGroups[0]])),
}, },
}, },
}; };
fakeServiceUrl = sandbox.stub(); fakeServiceUrl = sinon.stub();
fakeSettings = {}; fakeSettings = {};
}); });
afterEach(function() {
sandbox.restore();
});
function service() { function service() {
return groups( return groups(
fakeRootScope, fakeRootScope,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment