lists:foreach(fun(I) -> M = yourmodel:new(id, integer_to_list(I), 
undefined), M:save() end, lists:seq(1, 500))
Pretty sure this code can be used in tests too.
It's very similar to python

четверг, 6 февраля 2014 г., 5:32:25 UTC+4 пользователь till haxor написал:
>
> hi, i'm using CB to create a new project, i like erlang, and CB is the 
> best framework to build a great webapp in this language, i need some help
>
> how can i test 500 insert to a model?
>
> for example, a table with 2 columns (name, other), how can i insert 500 
> rows into this table using CB test's?
>
> excuse me, i'm new in erlang, i'm a python developer :)
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/498a776a-78c4-4061-aded-3afcc8b609a9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to