active_mocker icon indicating copy to clipboard operation
active_mocker copied to clipboard

Correctly Support many through

Open zeisler opened this issue 9 years ago • 0 comments

has_many :decision_mortgages
has_many :credit_liabilities, through: :decision_mortgages

ActiveMocker treats credit_liabilities as an association on the parent model and ignores the through.

The work around is

Model.new(credit_liabilities: credit_liabilities)

It should work like:

Model.new(decision_mortgages: [DecisionMortgage.new(credit_liability: CreditLiability.create)])

zeisler avatar Dec 19 '16 19:12 zeisler