meta {
  name: POST skill progression grant deny source kind
  type: http
  seq: 3
}

docs {
  NEO-38: salvage does not allow trainer in prototype_skills.json; expects granted false + source_kind_not_allowed.
}

post {
  url: {{baseUrl}}/game/players/dev-local-1/skill-progression
  body: json
  auth: none
}

body:json {
  {
    "schemaVersion": 1,
    "skillId": "salvage",
    "amount": 10,
    "sourceKind": "trainer"
  }
}

tests {
  test("denies with source_kind_not_allowed and echoes progression", function () {
    expect(res.getStatus()).to.equal(200);
    const body = res.getBody();
    expect(body.schemaVersion).to.equal(1);
    expect(body.granted).to.equal(false);
    expect(body.reasonCode).to.equal("source_kind_not_allowed");
    expect(body.progression).to.be.an("object");
    expect(body.progression.skills.length).to.equal(3);
  });
}
