await manager.postAdminLogin(res, ctx);
assert(!res.setHeader.called);
});
+ it('covers profile scheme fallback', async function () {
+ ctx.parsedBody.me = 'https://example.com/profile';
+ ctx.parsedBody.me_auto_scheme = '1';
+ manager.indieAuthCommunication.fetchProfile
+ .onCall(0).resolves()
+ .onCall(1).resolves({
+ metadata: {
+ issuer: 'https://example.com/',
+ authorizationEndpoint: 'https://example.com/auth',
+ },
+ });
+ await manager.postAdminLogin(res, ctx);
+ assert.strictEqual(res.statusCode, 302);
+
+ });
describe('living-standard-20220212', function () {
it('covers valid profile', async function () {
ctx.parsedBody.me = 'https://example.com/profile';