test: align approval and pairing expectations

This commit is contained in:
Peter Steinberger
2026-04-23 20:01:17 +01:00
parent b122a325cd
commit 8a4761fe95
2 changed files with 5 additions and 5 deletions

View File

@@ -118,13 +118,13 @@ function makeForeignChannelApprovalRequest(params: {
}
describe("matrix exec approvals", () => {
it("auto-enables when approvers resolve and disables only when forced off", () => {
it("requires enablement and approvers before enabling the client", () => {
expect(isMatrixExecApprovalClientEnabled({ cfg: buildConfig() })).toBe(false);
expect(
isMatrixExecApprovalClientEnabled({
cfg: buildConfig(undefined, { dm: { allowFrom: ["@owner:example.org"] } }),
}),
).toBe(true);
).toBe(false);
expect(isMatrixExecApprovalClientEnabled({ cfg: buildConfig({ enabled: true }) })).toBe(false);
expect(
isMatrixExecApprovalClientEnabled({

View File

@@ -235,18 +235,18 @@ describe("registerQrCli", () => {
expect(output).toContain("gateway.tailscale.mode=serve");
});
it("allows lan mdns cleartext setup urls", async () => {
it("allows private LAN IP cleartext setup urls", async () => {
loadConfig.mockReturnValue({
gateway: {
bind: "custom",
customBindHost: "gateway.local",
customBindHost: "192.168.1.8",
auth: { mode: "token", token: "tok" },
},
});
await runQr(["--setup-code-only"]);
expectLoggedSetupCode("ws://gateway.local:18789");
expectLoggedSetupCode("ws://192.168.1.8:18789");
});
it("allows android emulator cleartext override urls", async () => {