mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-05 09:07:13 +00:00
19 lines
572 B
JavaScript
19 lines
572 B
JavaScript
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs';
|
|
import test from 'node:test';
|
|
|
|
const source = fs.readFileSync(
|
|
new URL('../../src/app/login/page.tsx', import.meta.url),
|
|
'utf8',
|
|
);
|
|
|
|
test('normal Cloud login starts stateful Space OAuth', () => {
|
|
assert.match(source, /getSpaceAuthorizeUrl\(redirectUri\)/);
|
|
assert.doesNotMatch(source, /cloudEntry/);
|
|
});
|
|
|
|
test('invitation login remains on the OAuth callback path', () => {
|
|
assert.match(source, /getPendingInvitationToken\(\)/);
|
|
assert.match(source, /getSpaceAuthorizeUrl\(redirectUri\)/);
|
|
});
|