Improve specs

This commit is contained in:
François Turbelin
2025-01-08 22:39:52 +01:00
committed by Rachel Arnould
parent e946b50515
commit 9c153c6083
2 changed files with 4 additions and 13 deletions

View File

@@ -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

View File

@@ -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",