Mercurial > gemma
diff schema/auth_tests.sql @ 2147:b66cfcde8ff7
Print templates: Stubbed endpoints under /api/templates/print/{name}
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 08 Feb 2019 11:02:05 +0100 |
parents | c4db392130a4 |
children | 4374d942b23d |
line wrap: on
line diff
--- a/schema/auth_tests.sql Thu Feb 07 17:45:00 2019 +0100 +++ b/schema/auth_tests.sql Fri Feb 08 11:02:05 2019 +0100 @@ -36,16 +36,16 @@ $$, 'Only staged data should be visible'); -SELECT isnt_empty($$ - SELECT * FROM users.templates - $$, - 'User should see templates associated to him'); -SELECT is_empty($$ - SELECT * FROM users.templates - JOIN users.user_templates USING (template_name) - WHERE username <> current_user - $$, - 'User should only see templates associated to him'); +--SELECT isnt_empty($$ +-- SELECT * FROM users.templates +-- $$, +-- 'User should see templates associated to him'); +--SELECT is_empty($$ +-- SELECT * FROM users.templates +-- JOIN users.user_templates USING (template_name) +-- WHERE username <> current_user +-- $$, +-- 'User should only see templates associated to him'); -- -- Run tests as waterway administrator @@ -79,26 +79,26 @@ 'Waterway admin cannot insert data outside his region'); -- template management -SELECT isnt_empty($$ - SELECT * FROM users.templates - JOIN users.user_templates USING (template_name) - WHERE username <> current_user - $$, - 'Waterway admin should see templates of other users'); +--SELECT isnt_empty($$ +-- SELECT * FROM users.templates +-- JOIN users.user_templates USING (template_name) +-- WHERE username <> current_user +-- $$, +-- 'Waterway admin should see templates of other users'); -SELECT lives_ok($$ - INSERT INTO users.templates (template_name, template_data) - VALUES ('New AT', '\x'); - INSERT INTO users.user_templates - VALUES ('test_user_at', 'New AT') - $$, - 'Waterway admin can add templates for users in his country'); +--SELECT lives_ok($$ +-- INSERT INTO users.templates (template_name, template_data) +-- VALUES ('New AT', '\x'); +-- INSERT INTO users.user_templates +-- VALUES ('test_user_at', 'New AT') +-- $$, +-- 'Waterway admin can add templates for users in his country'); -SELECT throws_ok($$ - INSERT INTO users.user_templates VALUES ('waterway_user2', 'AT') - $$, - 42501, NULL, - 'Waterway admin cannot add template for other country'); +--SELECT throws_ok($$ +-- INSERT INTO users.user_templates VALUES ('waterway_user2', 'AT') +-- $$, +-- 42501, NULL, +-- 'Waterway admin cannot add template for other country'); SELECT isnt_empty($$ UPDATE users.templates SET template_data = '\xDABE'