mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Improve specs
This commit is contained in:
committed by
Rachel Arnould
parent
e946b50515
commit
9c153c6083
@@ -73,13 +73,4 @@ RSpec.describe Api::Admin::EnterpriseSerializer do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when there is a external billing id" do
|
||||
let(:enterprise) { create(:distributor_enterprise, external_billing_id: 'INV123456') }
|
||||
|
||||
it "includes URLs of image versions" do
|
||||
serializer = Api::Admin::EnterpriseSerializer.new(enterprise)
|
||||
expect(serializer.as_json[:external_billing_id]).to eq('INV123456')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -37,9 +37,9 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
tax_rate_name: "Tax 1"
|
||||
)
|
||||
end
|
||||
let(:distributor1) { create(:enterprise, name: "Hub 1", owner:) }
|
||||
let(:distributor1) { create(:enterprise, name: "Hub 1", owner:, external_billing_id: 'INV1234') }
|
||||
let(:distributor2) { create(:enterprise, name: "Hub 2", owner:) }
|
||||
let(:distributor3) { create(:enterprise, name: "Hub 3", owner:) }
|
||||
let(:distributor3) { create(:enterprise, name: "Hub 3", owner:, external_billing_id: 'INV4321') }
|
||||
let(:owner) { create(:user, email: 'email@email.com') }
|
||||
let(:order_cycle) { create(:simple_order_cycle) }
|
||||
let(:product) { create(:product) }
|
||||
@@ -90,7 +90,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"INV1234",
|
||||
"email@email.com",
|
||||
"none",
|
||||
"10 Lovely Street",
|
||||
@@ -134,7 +134,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"INV4321",
|
||||
"email@email.com",
|
||||
"none",
|
||||
"10 Lovely Street",
|
||||
|
||||
Reference in New Issue
Block a user