|
47 | 47 | And then using it in your tests as:
|
48 | 48 |
|
49 | 49 | ```elixir
|
50 |
| -# For getting a default parameter map. |
| 50 | +# For getting a default parameter struct. |
51 | 51 | FactoryEx.build(MyFactory)
|
52 | 52 |
|
53 |
| -# For getting a default parameter map with a modification. |
| 53 | +# For getting a default parameter struct with a modification. |
54 | 54 | FactoryEx.build(MyFactory, foo: 42)
|
55 | 55 |
|
56 |
| -# For getting a default parameter map and not validating the changeset |
| 56 | +# For getting a default parameter struct and not validating the changeset |
57 | 57 | FactoryEx.build(MyFactory, [foo: 42], validate?: false)
|
58 | 58 |
|
| 59 | +# For getting a default parameter map. |
| 60 | +FactoryEx.build_params(MyFactory) |
| 61 | + |
| 62 | +# For getting a default parameter map with a modification.. |
| 63 | +FactoryEx.build_params(MyFactory, foo: 10) |
| 64 | + |
| 65 | +# For getting a default parameter map and not validating the changeset |
| 66 | +FactoryEx.build_params(MyFactory, foo: 10, validate?: false) |
| 67 | + |
| 68 | +# For getting multiple default parameter maps |
| 69 | +FactoryEx.build_many_params(MyFactory, [foo: 42]) |
| 70 | + |
| 71 | +# For getting an invalid parameter maps |
| 72 | +FactoryEx.build_invalid_params(MyFactory, [foo: 42]) |
| 73 | + |
59 | 74 | # For inserting a default schema.
|
60 | 75 | FactoryEx.insert!(MyFactory)
|
61 | 76 |
|
62 | 77 | # For inserting a default schema with a modification.
|
63 | 78 | FactoryEx.insert!(MyFactory, foo: 42)
|
| 79 | + |
| 80 | +# For inserting multiple default schema |
| 81 | +FactoryEx.insert_many!(10, MyFactory, foo: 42) |
64 | 82 | ```
|
65 | 83 |
|
66 | 84 | ### Using FactoryEx.SchemaCounter
|
|
0 commit comments