fix sql test
This commit is contained in:
@@ -8,6 +8,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
-- drop function if exists edit_comment(regclass, uuid, text);
|
-- drop function if exists edit_comment(uuid, text);
|
||||||
|
|
||||||
-- select edit_comment('b0422e48-687f-bea7-b45f-b6b301246e97', 'plop4')
|
-- select edit_comment('b0422e48-687f-bea7-b45f-b6b301246e97', 'plop4')
|
||||||
@@ -61,7 +61,6 @@ begin
|
|||||||
assert (_find_comments_by_id_result->>'content' = 'Ho my god !'), 'content of comment must be "Ho my god !"';
|
assert (_find_comments_by_id_result->>'content' = 'Ho my god !'), 'content of comment must be "Ho my god !"';
|
||||||
|
|
||||||
perform edit_comment(
|
perform edit_comment(
|
||||||
reference => 'article'::regclass,
|
|
||||||
_id => _comment_id,
|
_id => _comment_id,
|
||||||
_content => 'edited content'::text
|
_content => 'edited content'::text
|
||||||
);
|
);
|
||||||
@@ -77,14 +76,14 @@ begin
|
|||||||
|
|
||||||
select resource, total
|
select resource, total
|
||||||
into _selected_comments, _selected_comments_total
|
into _selected_comments, _selected_comments_total
|
||||||
from find_comments_article_by_citizen(_citizen_id);
|
from find_comments_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_total = 1), 'the number of comments for this citizen must be 1, "' || _selected_comments_total || '" returned';
|
||||||
assert (_selected_comments#>>'{0,content}' = 'edited content'),
|
assert (_selected_comments#>>'{0,content}' = 'edited content'),
|
||||||
'the content of first comment for this citizen must be "edited content", "' || (_selected_comments#>>'{0,content}') || '" returned';
|
'the content of first comment for this citizen must be "edited content", "' || (_selected_comments#>>'{0,content}') || '" returned';
|
||||||
|
|
||||||
select resource, total
|
select resource, total
|
||||||
into _selected_comments, _selected_comments_total
|
into _selected_comments, _selected_comments_total
|
||||||
from find_comments_constitution_by_citizen(_citizen_id);
|
from find_comments_by_citizen(_citizen_id, 'constitution'::regclass);
|
||||||
assert (_selected_comments_total = 0), 'the number of comments for this citizen must be 0, "' || _selected_comments_total || '" returned';
|
assert (_selected_comments_total = 0), 'the number of comments for this citizen must be 0, "' || _selected_comments_total || '" returned';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user