Loading...
Loading...
Compare original and translation side by side
expect(order).to be_fulfilled
expect(user).to have_permission(:admin)expect(order.status).to eq("fulfilled")
expect(user.permissions).to include("admin")expect(order).to be_fulfilled
expect(user).to have_permission(:admin)expect(order.status).to eq("fulfilled")
expect(user.permissions).to include("admin")describecontextletsubjectexpectshouldbeforeshared_examplesbuildcreateRSpec.describe Order do
describe "#fulfill" do
context "when all items are in stock" do
it "marks the order as fulfilled" do
order = build(:order, :with_available_items)
order.fulfill
expect(order).to be_fulfilled
end
end
end
enddescribecontextletsubjectexpectshouldbeforeshared_examplesbuildcreateRSpec.describe Order do
describe "#fulfill" do
context "when all items are in stock" do
it "marks the order as fulfilled" do
order = build(:order, :with_available_items)
order.fulfill
expect(order).to be_fulfilled
end
end
end
enddescribebeforeEachdescribe("Order", () => {
describe("fulfill", () => {
it("marks the order as fulfilled when all items are in stock", () => {
const order = buildOrder({ items: availableItems });
order.fulfill();
expect(order.isFulfilled()).toBe(true);
});
});
});describebeforeEachdescribe("Order", () => {
describe("fulfill", () => {
it("marks the order as fulfilled when all items are in stock", () => {
const order = buildOrder({ items: availableItems });
order.fulfill();
expect(order.isFulfilled()).toBe(true);
});
});
});