Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Mar 28, 2024
1 parent 5405bcd commit 66a49af
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/mocha/js/components/session.spec.js
Expand Up @@ -29,7 +29,7 @@ define([
it('has an explicit method for every action (login, logout, register, etc) a user might need to do before he/she is authenticated', function() {
var s = new Session({ test: true });
var minsub = new (MinSub.extend({
request: function(apiRequest) {},
request: function(apiRequest) { },
}))({ verbose: false });

var api = new Api();
Expand All @@ -51,7 +51,6 @@ define([
s.login({
email: 'goo',
password: 'foo',
'g-recaptcha-response': 'boo',
});

csrfManager.resolvePromiseWithNewKey();
Expand All @@ -60,7 +59,7 @@ define([
expect(requestStub.args[0][0].toJSON().target).to.eql('accounts/user/login');
expect(requestStub.args[0][0].toJSON().options.type).to.eql('POST');
expect(requestStub.args[0][0].toJSON().options.data).to.eql(
'{"email":"goo","password":"foo","g-recaptcha-response":"boo"}'
'{"email":"goo","password":"foo"}'
);

s.logout();
Expand Down Expand Up @@ -108,7 +107,7 @@ define([
s.registerFail
);

const resetPasswordPayload = {email: 'goo@goo.com', 'g-recaptcha-response': 'boo'}
const resetPasswordPayload = { email: 'goo@goo.com', 'g-recaptcha-response': 'boo' }
s.resetPassword1(resetPasswordPayload);

csrfManager.resolvePromiseWithNewKey();
Expand All @@ -120,8 +119,8 @@ define([
expect(requestStub.args[3][0].toJSON().options.type).to.eql('POST');
expect(
requestStub.args[3][0].toJSON().options.data).to.eql(
'{"g-recaptcha-response":"boo"}',
);
'{"g-recaptcha-response":"boo"}',
);
expect(requestStub.args[3][0].toJSON().options.done).to.eql(
s.resetPassword1Success
);
Expand Down Expand Up @@ -157,7 +156,7 @@ define([

it('handles fail of method by 1) sending pubsub method and 2) sending alert', function() {
var minsub = new (MinSub.extend({
request: function(apiRequest) {},
request: function(apiRequest) { },
}))({ verbose: false });

var s = new Session();
Expand Down Expand Up @@ -213,7 +212,7 @@ define([

it('handles success of methods by 1) sending pubsub method and 2) optionally doing additional work', function() {
var minsub = new (MinSub.extend({
request: function(apiRequest) {},
request: function(apiRequest) { },
}))({ verbose: false });

var s = new Session();
Expand Down

0 comments on commit 66a49af

Please sign in to comment.