Jabol.Factory (Jabol v0.1.0)

View Source

Factory module for creating test data

Summary

Functions

Builds a struct of the given type with default attributes merged with the provided attributes.

Builds a list of structs

Creates a test record through the repository

Returns a map of default attributes for a given schema

Functions

build(schema, attrs \\ %{})

Builds a struct of the given type with default attributes merged with the provided attributes.

build_list(count, schema, attrs \\ %{})

Builds a list of structs

create(schema, attrs \\ %{})

Creates a test record through the repository

get_defaults(arg1)

Returns a map of default attributes for a given schema