-
Notifications
You must be signed in to change notification settings - Fork 11
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
How to fake form fields #14
Comments
@gswartz777 , sorry for delay, but I'm on vacation, and will be able to look at the question only in two weeks. |
While I can do that, an issue I'm running into with passing the model to the controller is that Model.IsValid is always true because model binding has already occurred. If I pass form fields, then the controller handles the model binding and will fire the validation. To this point, any fields marked required on the model are not validated when I pass the model directly to the controller. Thanks. |
Any update on this? |
@gswartz777 , if you're trying to test Sorry for so long delay. |
Please reopen with code sample if necessary. |
Is it possible to fake a form post to a controller? I saw setting up the Request for the FakeContext with FakePostData but the example didn't really make sense to me and I wasn't sure if that was specifically for form posts or something else. If for form posts, do you have a more complete example of how to provide that post data to the controller being tested? Thanks.
The text was updated successfully, but these errors were encountered: