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

Testing Default Values #3

Open
casey-chow opened this issue Nov 2, 2012 · 2 comments
Open

Testing Default Values #3

casey-chow opened this issue Nov 2, 2012 · 2 comments

Comments

@casey-chow
Copy link

I'm trying to test the default values on some Mongoose models. The test I'm using was basically making the object without the property in question and then testing if that value is added. However, this pattern does not seem to work with Factory Lady.

Is there a specific way to test defaults with Factory Lady? I already tried passing in { property_name: undefined } to Factory.build, to no avail.

@petejkim
Copy link
Owner

Any reason for not doing new Something?

@casey-chow
Copy link
Author

I have required fields, which means that with new Something I would have to basically copy the valid attributes object again sans a single line, which gets quite cumbersome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants