From 9c153c6083d505b21ec39ca7b96d5bf617ebf66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Wed, 8 Jan 2025 22:39:52 +0100 Subject: [PATCH] Improve specs --- spec/serializers/api/admin/enterprise_serializer_spec.rb | 9 --------- spec/system/admin/reports/revenues_by_hub_spec.rb | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/spec/serializers/api/admin/enterprise_serializer_spec.rb b/spec/serializers/api/admin/enterprise_serializer_spec.rb index df2a86f802..3f20145771 100644 --- a/spec/serializers/api/admin/enterprise_serializer_spec.rb +++ b/spec/serializers/api/admin/enterprise_serializer_spec.rb @@ -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 diff --git a/spec/system/admin/reports/revenues_by_hub_spec.rb b/spec/system/admin/reports/revenues_by_hub_spec.rb index 5e85340aa3..cc0c25ce11 100644 --- a/spec/system/admin/reports/revenues_by_hub_spec.rb +++ b/spec/system/admin/reports/revenues_by_hub_spec.rb @@ -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",