Untitled
unknown
plain_text
2 years ago
634 B
6
Indexable
it('Deve ser possível inserir uma sale', async function () {
const stub = sinon.stub(salesModel, 'insertNewSale').returns(RESULT_INSERT_ONE_SALE_MOCK);
const product = await salesModel.insertNewSale(INSERT_ONE_SALE_MOCK);
expect(product).to.be.deep.equal(RESULT_INSERT_ONE_SALE_MOCK);
stub.restore();
});
it('Deve ser possível inserir duas sales', async function () {
const stub = sinon.stub(salesModel, 'insertNewSale').returns(RESULT_INSERT_TWO_SALES_MOCK);
const product = await salesModel.insertNewSale(INSERT_TWO_SALES_MOCK);
expect(product).to.be.deep.equal(RESULT_INSERT_TWO_SALES_MOCK);Editor is loading...
Leave a Comment