web/website/tests/staff-bureau-read-api.test.mjs
Dev 6deb4a2e7d DuneRealms V2 clean baseline
Owner-authorised history reset; current source tree preserved exactly.
2026-11-13 00:05:14 +01:00

2 lines
531 B
JavaScript

import test from 'node:test';import assert from 'node:assert/strict';import {STAFF_DEPARTMENTS} from '../node/staff-bureau-policy.mjs';
test('staff bureau shadow API stays read-only and has four departments',async()=>{const {createStaffBureauReadApi}=await import('../node/staff-bureau-read-api.mjs');const api=createStaffBureauReadApi({});const response=await api(new Request('https://cp.dunerealms.com/api/v1/staff/me',{method:'POST'}));assert.equal(response.status,405);assert.equal(Object.keys(STAFF_DEPARTMENTS).length,4);});