Skip to content

Commit

Permalink
test: setting the quantity in import order
Browse files Browse the repository at this point in the history
  • Loading branch information
3rdvision committed Dec 6, 2022
1 parent 85a95f0 commit 64f416a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/js/api/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,32 @@ describe("OrderAPI", function() {

await remote.deleteOrderP(result.number);
});

it("should be able to set the quantity", async () => {
let result = null;

const remote = ripe.RipeAPI({ url: config.TEST_URL });
const ffOrderId = uuid.v4();

result = await remote.authAdminP(config.TEST_USERNAME, config.TEST_PASSWORD);

assert.strictEqual(result.username, config.TEST_USERNAME);
assert.notStrictEqual(typeof result.sid, undefined);

result = await remote.importOrderP(ffOrderId, {
type: "buildless",
brand: "dummy",
model: "dummy",
quantity: 22
});
assert.strictEqual(result.ff_order_id, ffOrderId);
assert.strictEqual(result.type, "buildless");
assert.strictEqual(result.brand, "dummy");
assert.strictEqual(result.shoe, "dummy");
assert.strictEqual(result.quantity, 22);

await remote.deleteOrderP(result.number);
});
});

describe("#preCustomization()", function() {
Expand Down

0 comments on commit 64f416a

Please sign in to comment.