Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Boolean value being stored when enabling eager_load = true in Test Env #1558

Open
Talha345 opened this issue Nov 22, 2022 · 1 comment
Labels

Comments

@Talha345
Copy link

Talha345 commented Nov 22, 2022

Description

We have the following factory.

factory :business_partner do name { Faker::name } company { true } location client default_company { true } end

The Factory works fine when using eager_load = false in the test environment.However, enabling eager_load the value for the default_company is stored as false which is also set as the default value on Model and DB level for this column.

Reproduction Steps

Run FactoryBot.create(:business_partner) on a Rails console.

System configuration

factory_bot_rails version: 6.2.0
factory_bot version: 6.2.1
rails version: 6.1.6
ruby version: 3.0.4

@Talha345 Talha345 added the bug label Nov 22, 2022
@composerinteralia
Copy link
Collaborator

This sounds more like an application setup bug than a factory_bot bug, but there's also not enough information here to help. We'd need either a reproduction script or a sample application that reproduces the problem to help further.

@composerinteralia composerinteralia transferred this issue from thoughtbot/factory_bot_rails Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants