Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izelnakri/fixturist
Fix the foreign-key constraints in your fixture driven backend tests. This library is an algorithm for populating relationships from your development database
https://github.com/izelnakri/fixturist
database ecto elixir fixtures foreign-key-constraints testing testing-tools
Last synced: 20 days ago
JSON representation
Fix the foreign-key constraints in your fixture driven backend tests. This library is an algorithm for populating relationships from your development database
- Host: GitHub
- URL: https://github.com/izelnakri/fixturist
- Owner: izelnakri
- License: mit
- Created: 2016-12-25T13:21:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-05T22:51:26.000Z (almost 8 years ago)
- Last Synced: 2024-10-11T14:01:33.039Z (about 1 month ago)
- Topics: database, ecto, elixir, fixtures, foreign-key-constraints, testing, testing-tools
- Language: Elixir
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fixturist
Fixturist fixes the major caveat of fixture based backend testing: your fixture records might have foreign-key constraints. This can prevent the insertion of your fixture records and you have to keep track of the order of relationships during the insertion.
This library is smart algorithm that checks if your records have relationships, fetches the required relationships from your development database and runs a nifty algorithm to order the insertion of fetched records. All happens with the minimal/optimized SQL under the hood.
**Fixturist only loads on test mix environments**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
1. Add `fixturastic` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:fixturist, "~> 0.1.0"}]
end
```2. Ensure `fixturastic` is started before your application:
```elixir
def application do
[applications: [:fixturist]]
end
```## Usage
todo