feature #7: add query "find_comments_article_by_citizen" and "find_comments_constitution_by_citizen"
This commit is contained in:
1 parent
f167cf02f9
commit
ce38aa6fe2
3 files changed
+69
-2
No files matched your search
@@ -62,8 +62,21 @@ begin
|
||||
select resource, total
|
||||
into _selected_comments, _selected_comments_total
|
||||
from find_comments_by_citizen(_citizen_id);
|
||||
assert (_selected_comments_total = 1), 'the number of comments for this citizen must be 1';
|
||||
assert (_selected_comments#>>'{0,content}' = 'edited content'), 'the content of first comment for this citizen must be "edited content", "' || (_selected_comments#>>'{0,content}') || '" returned';
|
||||
assert (_selected_comments_total = 1), 'the number of comments for this citizen must be 1, "' || _selected_comments_total || '" returned';
|
||||
assert (_selected_comments#>>'{0,content}' = 'edited content'),
|
||||
'the content of first comment for this citizen must be "edited content", "' || (_selected_comments#>>'{0,content}') || '" returned';
|
||||
|
||||
select resource, total
|
||||
into _selected_comments, _selected_comments_total
|
||||
from find_comments_article_by_citizen(_citizen_id);
|
||||
assert (_selected_comments_total = 1), 'the number of comments for this citizen must be 1, "' || _selected_comments_total || '" returned';
|
||||
assert (_selected_comments#>>'{0,content}' = 'edited content'),
|
||||
'the content of first comment for this citizen must be "edited content", "' || (_selected_comments#>>'{0,content}') || '" returned';
|
||||
|
||||
select resource, total
|
||||
into _selected_comments, _selected_comments_total
|
||||
from find_comments_constitution_by_citizen(_citizen_id);
|
||||
assert (_selected_comments_total = 0), 'the number of comments for this citizen must be 0, "' || _selected_comments_total || '" returned';
|
||||
|
||||
-- delete comment and context
|
||||
delete from "comment";
|
||||
|
||||
Reference in new issue
Block a user