feat(server): plugins list says which sources sign in with a device code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c2e8c83f86
commit
53d9e7c9c9
@@ -348,6 +348,12 @@ forEachDialect("api", (getDb) => {
|
||||
expect(await (await call(app, "GET", "copies", { cookie: ana })).json()).toEqual([expect.objectContaining({ workTitle: "Dune", format: "Paperback" })]);
|
||||
});
|
||||
|
||||
test("plugins: manifests say whether the source signs in with a device code", async () => {
|
||||
const ana = await signUp(app, "ana");
|
||||
const list = (await (await call(app, "GET", "plugins", { cookie: ana })).json()) as { id: string; deviceAuth: boolean; config: unknown[] }[];
|
||||
expect(list.find((p) => p.id === "echo")).toEqual(expect.objectContaining({ deviceAuth: false, config: expect.any(Array) }));
|
||||
});
|
||||
|
||||
test("JSON bodies need Content-Type application/json (415)", async () => {
|
||||
const res = await app.fetch(
|
||||
new Request(`${BASE}/auth/register`, {
|
||||
|
||||
Reference in New Issue
Block a user