import { assertEquals } from "https://deno.land/std@0.204.0/assert/mod.ts";
import { describe, it as test } from "https://deno.land/std@0.149.0/testing/bdd.ts";
import {Permission} from "../src/permission.ts";
import {Role} from "../src/role.ts";

describe('Permission', () => {
    test('read', () => assertEquals(Permission.read(Role.any()), 'read("any")'));
    test('write', () => assertEquals(Permission.write(Role.any()), 'write("any")'));
    test('create', () => assertEquals(Permission.create(Role.any()), 'create("any")'));
    test('update', () => assertEquals(Permission.update(Role.any()), 'update("any")'));
    test('delete', () => assertEquals(Permission.delete(Role.any()), 'delete("any")'));
})
