Add find_opinions.sql

This commit is contained in:
2020-02-08 01:24:16 +01:00
parent 7742287884
commit 976f8fac6a
3 changed files with 24 additions and 0 deletions

View File

@@ -93,6 +93,10 @@ begin
from find_citizen_opinions_by_target_ids(_citizen_id, array[(created_article->>'id')::uuid]) o),
'The first opinion must have a name';
assert(
select find_opinions()#>>'{0, name}' = 'Opinion1'
), 'find_opinions mst be return all opinions';
-- delete vote and context
delete from opinion;
delete from opinion_list;