change getRequestFromSlotId to getActiveSlot
This commit is contained in:
parent
9751b0de5e
commit
945c501ce6
|
@ -219,7 +219,7 @@ contract Marketplace is Collateral, Proofs, StateRetrieval {
|
|||
return _slots[slotId].host;
|
||||
}
|
||||
|
||||
function getRequestFromSlotId(SlotId slotId)
|
||||
function getActiveSlot(SlotId slotId)
|
||||
public
|
||||
view
|
||||
slotIsNotFree(slotId)
|
||||
|
|
|
@ -141,16 +141,16 @@ describe("Marketplace", function () {
|
|||
})
|
||||
|
||||
it("fails to retrieve a request of an empty slot", async function () {
|
||||
expect(marketplace.getRequestFromSlotId(slotId(slot))).to.be.revertedWith(
|
||||
expect(marketplace.getActiveSlot(slotId(slot))).to.be.revertedWith(
|
||||
"Slot is free"
|
||||
)
|
||||
})
|
||||
|
||||
it("allows retrieval of request of a filled slot", async function () {
|
||||
await marketplace.fillSlot(slot.request, slot.index, proof)
|
||||
expect(
|
||||
await marketplace.getRequestFromSlotId(slotId(slot))
|
||||
).to.be.request((request, slot.index))
|
||||
expect(await marketplace.getActiveSlot(slotId(slot))).to.be.request(
|
||||
(request, slot.index)
|
||||
)
|
||||
})
|
||||
|
||||
it("is rejected when proof is incorrect", async function () {
|
||||
|
|
Loading…
Reference in New Issue