From 8d018d996c1eddb882dc64ebbd228bb0135944f3 Mon Sep 17 00:00:00 2001
From: sadbeast <sadbeast@sadbeast.com>
Date: Sun, 23 Jun 2024 15:36:59 -0700
Subject: wtf

---
 test/permissions.sql | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 test/permissions.sql

(limited to 'test/permissions.sql')

diff --git a/test/permissions.sql b/test/permissions.sql
new file mode 100644
index 0000000..a848a74
--- /dev/null
+++ b/test/permissions.sql
@@ -0,0 +1,25 @@
+/* CREATE EXTENSION IF NOT EXISTS pgtap; */
+BEGIN;
+SELECT plan(9);
+
+SELECT has_group('dml');
+SELECT has_group('ddl');
+SELECT has_group('read_only');
+
+SELECT has_user('teamdraft');
+SELECT database_privs_are(
+    'teamdraft', 'teamdraft', ARRAY['CONNECT', 'TEMPORARY', 'CREATE']
+);
+
+SELECT has_user('teamdraft_website');
+SELECT database_privs_are(
+    'teamdraft', 'teamdraft_website', ARRAY['CONNECT', 'TEMPORARY']
+);
+
+SELECT has_user('teamdraft_ro');
+SELECT database_privs_are(
+    'teamdraft', 'teamdraft_ro', ARRAY['CONNECT', 'TEMPORARY']
+);
+
+SELECT * FROM finish();
+ROLLBACK;
-- 
cgit v1.2.3

