changeset 112:894f633e2d3f

WIP: Add failing test.
author Tom Gottfried <tom@intevation.de>
date Fri, 15 Jun 2018 20:20:44 +0200
parents 767f3edc502c
children 25b28fd0e256
files tap_tests.sql
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tap_tests.sql	Fri Jun 15 20:20:29 2018 +0200
+++ b/tap_tests.sql	Fri Jun 15 20:20:44 2018 +0200
@@ -5,7 +5,7 @@
 
 CREATE EXTENSION pgtap;
 
-SELECT plan(9); -- Give number of tests that have to be run
+SELECT plan(10); -- Give number of tests that have to be run
 
 SET search_path TO public, wamos, wamos_waterway, wamos_fairway;
 
@@ -66,6 +66,13 @@
                       4326))', 42501, NULL,
                  'Waterway admin cannot insert data outside his region');
 
+-- XXX: Why does this fail? POLICY manage_templates should allow to see
+-- the template of waterway_user.
+SELECT isnt_empty('SELECT * FROM templates t
+                   JOIN user_templates ut ON t.id = template_id
+                   WHERE username <> current_user',
+                  'Waterway admin should see templates of users in country');
+
 --
 -- finish tests
 --