{"id":13508813,"url":"https://github.com/danielberkompas/ecto_validation_case","last_synced_at":"2025-04-10T11:26:44.012Z","repository":{"id":31685346,"uuid":"35250922","full_name":"danielberkompas/ecto_validation_case","owner":"danielberkompas","description":"Simplify your Ecto validation tests","archived":false,"fork":false,"pushed_at":"2015-09-03T16:31:36.000Z","size":164,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T10:12:22.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielberkompas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-08T00:53:35.000Z","updated_at":"2023-09-01T10:49:01.000Z","dependencies_parsed_at":"2022-08-30T04:01:20.502Z","dependency_job_id":null,"html_url":"https://github.com/danielberkompas/ecto_validation_case","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fecto_validation_case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fecto_validation_case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fecto_validation_case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fecto_validation_case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielberkompas","download_url":"https://codeload.github.com/danielberkompas/ecto_validation_case/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208640,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:58.819Z","updated_at":"2025-04-10T11:26:43.995Z","avatar_url":"https://github.com/danielberkompas.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"Ecto.ValidationCase\n==================\n\n[![Hex Version](http://img.shields.io/hexpm/v/ecto_validation_case.svg)](https://hex.pm/packages/ecto_validation_case)\n[![Build Status](https://travis-ci.org/danielberkompas/ecto_validation_case.svg?branch=master)](https://travis-ci.org/danielberkompas/ecto_validation_case)\n[![Inline docs](http://inch-ci.org/github/danielberkompas/ecto_validation_case.svg?branch=master)](http://inch-ci.org/github/danielberkompas/ecto_validation_case)\n\nSimplify your [Ecto][ecto] model validation tests. Loosely inspired by [shoulda\nmatchers][shoulda], but simpler.\n\n## IMPORTANT\n\nJose Valim, creator of Elixir, has outlined a better approach to this problem\nhere: https://groups.google.com/forum/#!topic/elixir-lang-talk/kwLLyCiarls\n\nGo check it out.\n\n## Sample\n\n```elixir\ndefmodule MyApp.UserTest do\n  use ExUnit.Case\n  use Ecto.ValidationCase, model: MyApp.User\n\n  test \"requires password to be 10 chars long\" do\n    rejects \"password\",    for: :password, message: \"too short\"\n    accepts \"password123\", for: :password\n  end\nend\n```\n\n## Rationale\n\nRather than create a matching test helper function for each of the valiations\nthat [Ecto][ecto] supports, this library intentionally keeps things simple,\nproviding only `accepts/2` and `rejects/2`. Why?\n\n- The api very easy to remember, which makes validation tests more likely to be\n  written.\n- The tests are more explicit, with a minimum of magic. It is very clear exactly\n  what values are being tested, for which fields, and which error messages\n  should be returned.\n\n## Installation\n\nYou can install `Ecto.ValidationCase` from hex. First, change your `deps` in\n`mix.exs` specifying that this is applicable only for the test environment:\n\n```elixir\ndef deps do\n  [{:ecto_validation_case, \"\u003e= 0.1.0\", env: :test}]\nend\n```\n\nThen run `mix deps.get` to install.\n\n## Documentation\n\nDocumentation is available on `Ecto.ValidationCase`'s [hex page][hex-page].\n\n## License\n\nMIT. See [LICENSE](/LICENSE) and [NOTICE](/NOTICE) for more details.\n\n[hex-page]: https://hex.pm/packages/ecto_validation_case\n[ecto]: https://github.com/elixir-lang/ecto\n[shoulda]: http://matchers.shoulda.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberkompas%2Fecto_validation_case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielberkompas%2Fecto_validation_case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberkompas%2Fecto_validation_case/lists"}