Slide 71
Slide 71 text
describe User do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
let!(:admin) { create(:user, admin: true, organization: organization) }
# lots of other tests
describe "Invoices" do
let(:product) { create(:product) }
let(:invoice) { create(:invoice, owner: user, items: [product] }
it "is complete" do
expect(invoice).to be_complete
end
it "is an active product" do
expect(product).to be_active
end
end
end