Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marick/ecto_flow_assertions
Flow-style assertions for use with Ecto (mainly about changesets)
https://github.com/marick/ecto_flow_assertions
Last synced: 3 months ago
JSON representation
Flow-style assertions for use with Ecto (mainly about changesets)
- Host: GitHub
- URL: https://github.com/marick/ecto_flow_assertions
- Owner: marick
- License: unlicense
- Created: 2020-08-13T19:50:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T22:56:25.000Z (over 3 years ago)
- Last Synced: 2024-09-19T17:17:46.769Z (4 months ago)
- Language: Elixir
- Size: 40 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ecto Flow Assertions
This is a library of assertions for code that works with Ecto schemas
or changesets. It is built on top of
[`FlowAssertions`](https://hex.pm/packages/ecto_flow_assertions). It
is used to write tests in this style:```elixir
VM.ServiceGap.accept_form(…)
|> ok_content(Changeset)
|> assert_valid
|> assert_changes(id: 1,
in_service_datestring: @iso_date_1,
out_of_service_datestring: @iso_date_2,
reason: "reason")
```See the [documentation](https://hexdocs.pm/ecto_flow_assertions/FlowAssertions.Ecto.html) for more.
## Installation
Add `ecto_flow_assertions` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ecto_flow_assertions, "~> 0.1", only: :test},
]
end
```