Skip to content

fflib_SObjectSelectorTest.cls Tests Failing in Multicurrency scratch org #512

@parsam97

Description

@parsam97

Describe the bug
All tests that expect CurrencyIsoCode to appear for CaseComment are failing. Commenting these lines
expectedSelectFields.add('currencyisocode');
...enable the tests in that class to pass.

CaseComment does not have a CurrencyIsoCode field as far as I'm aware. So I'm wondering why these tests are specifically asserting for something directly against that.

To Reproduce

With the packages installed on a scratch org with multicurrency enabled (using the same scratch org definition file as provided on fflib-apex-common repo), run tests in fflib_SObjectSelectorTest.cls.

Expected behavior
Tests in multicurrency org to pass.

Screenshots and text of error observed
For instance:

fflib_SObjectSelectorTest.toSOQL_When_SystemModePolymorphicSelect_Expect_RelatedType  fflib_SObjectSelector  Fail     43%      System.AssertException: Assertion Failed: Expected: SELECT id, commentbody, currencyisocode, parent.ownerid, parent.id, parent.currencyisocode, parent.owner.userroleid, parent.owner.id, parent.owner.currencyisocode FROM CaseComment WITH SYSTEM_MODE ORDER BY CreatedDate ASC NULLS FIRST , Actual: SELECT id, commentbody, parent.ownerid, parent.id, parent.currencyisocode, parent.owner.userroleid, parent.owner.id, parent.owner.currencyisocode FROM CaseComment WITH SYSTEM_MODE ORDER BY CreatedDate ASC NULLS FIRST

Version
Yes, I've cloned the repo today and started playing around with it and discovered that tests aren't passing in multicurrency org.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions