feature #7: add query "find_comments_article_by_citizen" and "find_comments_constitution_by_citizen"
This commit is contained in:
@@ -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