meta {
  name: POST inventory add deny invalid item
  type: http
  seq: 3
}

docs {
  NEO-55: unknown itemId denies with invalid_item and echoes unchanged inventory.
}

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

body:json {
  {
    "schemaVersion": 1,
    "mutationKind": "add",
    "itemId": "not-a-prototype-item",
    "quantity": 1
  }
}

tests {
  test("denies with invalid_item and echoes inventory", function () {
    expect(res.getStatus()).to.equal(200);
    const body = res.getBody();
    expect(body.schemaVersion).to.equal(1);
    expect(body.applied).to.equal(false);
    expect(body.reasonCode).to.equal("invalid_item");
    expect(body.inventory).to.be.an("object");
    expect(body.inventory.bagSlots.length).to.equal(24);
  });
}
