neon-sprawl/bruno/neon-sprawl-server/perk-state/Get perk state.bru

29 lines
735 B
Plaintext

meta {
name: GET perk state
type: http
seq: 1
}
docs {
NEO-48: per-player perk state read model (branch picks + unlocked perk ids).
Empty state until branch picks; pair with skill-progression grant + POST branch select.
}
get {
url: {{baseUrl}}/game/players/dev-local-1/perk-state
body: none
auth: none
}
tests {
test("returns 200 JSON schema v1", function () {
expect(res.getStatus()).to.equal(200);
expect(res.getHeader("content-type")).to.contain("application/json");
const body = res.getBody();
expect(body.schemaVersion).to.equal(1);
expect(body.playerId).to.equal("dev-local-1");
expect(body.branchPicks).to.be.an("array");
expect(body.unlockedPerkIds).to.be.an("array");
});
}