TestInitialRoles ensures the starting roles for the first user are correct.
(t *testing.T)
| 1641 | |
| 1642 | // TestInitialRoles ensures the starting roles for the first user are correct. |
| 1643 | func TestInitialRoles(t *testing.T) { |
| 1644 | t.Parallel() |
| 1645 | ctx := context.Background() |
| 1646 | client := coderdtest.New(t, nil) |
| 1647 | first := coderdtest.CreateFirstUser(t, client) |
| 1648 | |
| 1649 | roles, err := client.UserRoles(ctx, codersdk.Me) |
| 1650 | require.NoError(t, err) |
| 1651 | require.ElementsMatch(t, roles.Roles, []string{ |
| 1652 | codersdk.RoleOwner, |
| 1653 | }, "should be a member and admin") |
| 1654 | |
| 1655 | require.ElementsMatch(t, roles.OrganizationRoles[first.OrganizationID], []string{}, "should be a member") |
| 1656 | } |
| 1657 | |
| 1658 | func TestPutUserSuspend(t *testing.T) { |
| 1659 | t.Parallel() |
nothing calls this directly
no test coverage detected