Ruby on Rails Tuesday, March 4, 2014

They all pass. That's the problem. Mass-assignment doesn't seem to get caught by the testing environment.

On Tuesday, March 4, 2014 8:13:03 PM UTC+3, Dave Aronson wrote:
On Tue, Mar 4, 2014 at 8:49 AM, bertly_the_coder <muc...@gmail.com> wrote:

> Has anyone figured out how to test strong parameters?

You mean test the concept itself, or test that your usage of it does
what you intend?  I haven't done so, but offhand, I would guess you
could do that by testing a few requests with good or bad parameter
sets, and seeing whether Rails gritches about them or not.

-Dave

--
Dave Aronson, the T. Rex of Codosaurus LLC (www.codosaur.us);
FREELANCE SOFTWARE DEVELOPER, AVAILABLE AS OF MARCH 1st 2014;
creator of Pull Request Roulette, at PullRequestRoulette.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a61b3550-1cff-4e15-8295-766d0219bb83%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment