-
Notifications
You must be signed in to change notification settings - Fork 21
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
Field 'foo' doesn't have a default value #17
Comments
As I look deeper I see both this section on validation behaior which says:
and the comment on
So my tests may have been previously passing due to some interaction related to the old cake factories because I had both listeners turned on at that point. |
Let us know, if you are experiencing further issues there. |
This is an ongoing issue. Where previously I did not have to create any code in |
What is the issue you are actually having? Is there anyting we can improve or solve? |
This is my database schema. It has columns that do not have defaults but are not allowed to be NULL. This is my test class:
Running the test results in this error. My expectation based on the documentation and my previous experience is that the entity could be created without error in this circumstance. My factory is baked from the most recent version: |
I do not know how your code was before, but this should normally not have worked before either. In your case, you should have in your factory:
Your test could then look like this:
or like that, if you want to control the value of the field
Does this make sense? |
Perfect sense, thanks. |
After updating I started getting 'Field 'foo' doesn't have a default value' errors on previously passing tests.
Wasn't the system glossing over errors like this when
make()
ing records?After updating to 0.2.14 (that's when I noticed it), tests that were previously running started throwing this error.
My code was in a bit of chaos at that point so I'm not 100% sure about this.
I'm on 0.2.15 now
The text was updated successfully, but these errors were encountered: