Implemented FxA
This commit is contained in:
parent
70bc2b7656
commit
718d74fa50
40 changed files with 1306 additions and 651 deletions
|
@ -31,7 +31,7 @@ const storedMeta = {
|
|||
|
||||
const authMiddleware = proxyquire('../../server/middleware/auth', {
|
||||
'../storage': storage
|
||||
});
|
||||
}).hmac;
|
||||
|
||||
describe('Owner Middleware', function() {
|
||||
afterEach(function() {
|
||||
|
|
|
@ -19,9 +19,9 @@ function response() {
|
|||
};
|
||||
}
|
||||
|
||||
const ownerMiddleware = proxyquire('../../server/middleware/owner', {
|
||||
const ownerMiddleware = proxyquire('../../server/middleware/auth', {
|
||||
'../storage': storage
|
||||
});
|
||||
}).owner;
|
||||
|
||||
describe('Owner Middleware', function() {
|
||||
afterEach(function() {
|
||||
|
|
|
@ -40,7 +40,7 @@ describe('/api/params', function() {
|
|||
it('sends a 400 if dlimit is too large', function() {
|
||||
const req = request('x');
|
||||
const res = response();
|
||||
req.body.dlimit = 21;
|
||||
req.body.dlimit = 201;
|
||||
paramsRoute(req, res);
|
||||
sinon.assert.calledWith(res.sendStatus, 400);
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* global DEFAULT_EXPIRE_SECONDS */
|
||||
/* global DEFAULTS */
|
||||
import assert from 'assert';
|
||||
import Archive from '../../../app/archive';
|
||||
import * as api from '../../../app/api';
|
||||
|
@ -23,8 +23,9 @@ describe('API', function() {
|
|||
enc,
|
||||
meta,
|
||||
verifierB64,
|
||||
p,
|
||||
DEFAULT_EXPIRE_SECONDS
|
||||
DEFAULTS.EXPIRE_SECONDS,
|
||||
null,
|
||||
p
|
||||
);
|
||||
|
||||
const result = await up.result;
|
||||
|
@ -43,8 +44,9 @@ describe('API', function() {
|
|||
enc,
|
||||
meta,
|
||||
verifierB64,
|
||||
p,
|
||||
DEFAULT_EXPIRE_SECONDS
|
||||
DEFAULTS.EXPIRE_SECONDS,
|
||||
null,
|
||||
p
|
||||
);
|
||||
|
||||
up.cancel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue