Unverified Commit d26b8f5e authored by Robert Knight's avatar Robert Knight Committed by Sean Hammond

Remove duplicated fakeAuth.login stub

parent 5b8f6033
...@@ -107,7 +107,6 @@ describe('sidebar.session', function () { ...@@ -107,7 +107,6 @@ describe('sidebar.session', function () {
context('when using OAuth for first-party accounts', () => { context('when using OAuth for first-party accounts', () => {
beforeEach(() => { beforeEach(() => {
fakeAuth.login = sinon.stub().returns(Promise.resolve());
fakeStore.profile.read.returns(Promise.resolve({ fakeStore.profile.read.returns(Promise.resolve({
userid: 'acct:user@hypothes.is', userid: 'acct:user@hypothes.is',
})); }));
...@@ -179,9 +178,6 @@ describe('sidebar.session', function () { ...@@ -179,9 +178,6 @@ describe('sidebar.session', function () {
describe('#reload', () => { describe('#reload', () => {
beforeEach(() => { beforeEach(() => {
// Use OAuth
fakeAuth.login = sinon.stub().returns(Promise.resolve());
// Load the initial profile data, as the client will do on startup. // Load the initial profile data, as the client will do on startup.
fakeStore.profile.read.returns(Promise.resolve({ fakeStore.profile.read.returns(Promise.resolve({
userid: 'acct:user_a@hypothes.is', userid: 'acct:user_a@hypothes.is',
...@@ -204,7 +200,6 @@ describe('sidebar.session', function () { ...@@ -204,7 +200,6 @@ describe('sidebar.session', function () {
beforeEach(() => { beforeEach(() => {
var loggedIn = true; var loggedIn = true;
fakeAuth.login = sinon.stub().returns(Promise.resolve());
fakeAuth.logout = sinon.spy(() => { fakeAuth.logout = sinon.spy(() => {
loggedIn = false; loggedIn = false;
return Promise.resolve(); return Promise.resolve();
...@@ -238,7 +233,6 @@ describe('sidebar.session', function () { ...@@ -238,7 +233,6 @@ describe('sidebar.session', function () {
context('when another client changes the current login', () => { context('when another client changes the current login', () => {
it('reloads the profile', () => { it('reloads the profile', () => {
fakeAuth.login = sinon.stub().returns(Promise.resolve());
fakeStore.profile.read.returns(Promise.resolve({ fakeStore.profile.read.returns(Promise.resolve({
userid: 'acct:initial_user@hypothes.is', userid: 'acct:initial_user@hypothes.is',
})); }));
......
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