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 {Role} from "../src/role.ts";

describe('Role', () => {
    test('any', () => assertEquals(Role.any(), 'any'));
    test('user without status', () => assertEquals(Role.user('custom'), 'user:custom'));
    test('user with status', () => assertEquals(Role.user('custom', 'verified'), 'user:custom/verified'));
    test('users without status', () => assertEquals(Role.users(), 'users'));
    test('users with status', () => assertEquals(Role.users('verified'), 'users/verified'));
    test('guests', () => assertEquals(Role.guests(), 'guests'));
    test('team without role', () => assertEquals(Role.team('custom'), 'team:custom'))
    test('team with role', () => assertEquals(Role.team('custom', 'owner'), 'team:custom/owner'))
    test('member', () => assertEquals(Role.member('custom'), 'member:custom'))
    test('label', () => assertEquals(Role.label('admin'), 'label:admin'))
})
