42 lines
1011 B
Plaintext
42 lines
1011 B
Plaintext
meta {
|
|
name: Accept refine prerequisite deny
|
|
type: http
|
|
seq: 4
|
|
}
|
|
|
|
docs {
|
|
NEO-120: refine intro requires completed gather intro — deny prerequisite_incomplete without mutation.
|
|
Pre-request clears gather and refine progress so gather intro is not completed.
|
|
}
|
|
|
|
script:pre-request {
|
|
const { resetQuestProgress } = require("./scripts/bruno-dev-fixture-helper");
|
|
await resetQuestProgress(bru, [
|
|
"prototype_quest_gather_intro",
|
|
"prototype_quest_refine_intro",
|
|
]);
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/game/players/{{playerId}}/quests/prototype_quest_refine_intro/accept
|
|
body: json
|
|
auth: none
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"schemaVersion": 1
|
|
}
|
|
}
|
|
|
|
tests {
|
|
test("denies accept with prerequisite_incomplete", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
const body = res.getBody();
|
|
expect(body.schemaVersion).to.equal(1);
|
|
expect(body.accepted).to.equal(false);
|
|
expect(body.reasonCode).to.equal("prerequisite_incomplete");
|
|
expect(body.quest).to.equal(undefined);
|
|
});
|
|
}
|