# `Sekisho.Test`
[🔗](https://github.com/hattoriai/sekisho/blob/v0.1.0-dev/lib/sekisho/test.ex#L1)

Assertions for your tests, whose failures say why (`explain/3`):

    use Sekisho.Test, permissions: MyApp.Permissions

    assert_allowed scope, :update, post
    refute_allowed scope, :delete, post
    assert_where_allowed Post, scope, :read, [published, mine]

and a test that your policies are valid together:

    test "the permissions are valid" do
      assert MyApp.Permissions.validate!() == :ok
    end

# `assert_allowed`
*macro* 

Asserts the scope has the permission on the resource.

# `assert_where_allowed`
*macro* 

Asserts `where_allowed/3` gives exactly these records, in any order.

# `refute_allowed`
*macro* 

Asserts the scope does not have the permission on the resource.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
