Skip to content

Commit

Permalink
[161265] Yet another reconcile credit card test fix (#4842)
Browse files Browse the repository at this point in the history
* Yet another reconcile credit card test fix
  • Loading branch information
joaquinco authored Dec 11, 2024
1 parent e1f3048 commit 435df0b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 46 deletions.
26 changes: 26 additions & 0 deletions spec/models/account_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,30 @@
expect(instance.creation_enabled_types).not_to include("NufsAccount")
end
end

describe "reconcilable_account_types" do
let(:some_account_type) { "SomeAccount" }

before do
account_type_double = double(some_account_type)
allow(account_type_double).to receive(:reconcilable?).and_return(true)
allow(account_type_double).to receive(:to_s).and_return(some_account_type)

allow_any_instance_of(String).to receive(:constantize).and_return(
account_type_double
)

instance.statement_account_types << some_account_type.dup
end

it "includes statement account types" do
expect(instance.reconcilable_account_types).to include(some_account_type)
end

it "does not include creation_disabled_types" do
instance.creation_disabled_types << some_account_type

expect(instance.reconcilable_account_types).to_not include(some_account_type)
end
end
end
42 changes: 0 additions & 42 deletions spec/system/admin/billing_tab_spec.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
let(:director) { create(:user, :facility_director, facility: facility) }
let(:statement) { StatementPresenter.new order_detail.statement }

def credit_card_account_enabled?
Account.config.reconcilable_account_types.include?("CreditCardAccount")
end

before do
orders.zip(statements).each do |order, statement|
order.order_details.each do |od|
Expand Down

0 comments on commit 435df0b

Please sign in to comment.