mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 18:48:06 +03:00
4566e6b530
* add a new crm usage route for admins * add a test for admin route authorization * add full_build_only tag
14 lines
387 B
Elixir
14 lines
387 B
Elixir
defmodule PlausibleWeb.AdminControllerTest do
|
|
use PlausibleWeb.ConnCase
|
|
|
|
describe "GET /crm/auth/user/:user_id/usage" do
|
|
setup [:create_user, :log_in]
|
|
|
|
@tag :full_build_only
|
|
test "returns 403 if the logged in user is not a super admin", %{conn: conn} do
|
|
conn = get(conn, "/crm/auth/user/1/usage")
|
|
assert response(conn, 403) == "Not allowed"
|
|
end
|
|
end
|
|
end
|