update postgresjson
This commit is contained in:
@@ -50,7 +50,7 @@ begin
|
||||
select "comment"(
|
||||
reference => 'article'::regclass,
|
||||
target_id => (created_article->>'id')::uuid,
|
||||
citizen_id => _citizen_id,
|
||||
created_by_id => _citizen_id,
|
||||
content => 'Ho my god !'::text
|
||||
) into _comment_id;
|
||||
assert (select count(*) = 1 from "comment"), 'comment must be inserted';
|
||||
@@ -86,7 +86,7 @@ begin
|
||||
select "comment"(
|
||||
reference => 'article'::regclass,
|
||||
target_id => (created_article->>'id')::uuid,
|
||||
citizen_id => _citizen_id,
|
||||
created_by_id => _citizen_id,
|
||||
content => 'God not exist'::text,
|
||||
parent_id => _comment_id::uuid
|
||||
) into _comment_id_response;
|
||||
@@ -94,7 +94,7 @@ begin
|
||||
select "comment"(
|
||||
reference => 'article'::regclass,
|
||||
target_id => (created_article->>'id')::uuid,
|
||||
citizen_id => _citizen_id,
|
||||
created_by_id => _citizen_id,
|
||||
content => 'are you really sure ?'::text,
|
||||
parent_id => _comment_id_response::uuid
|
||||
) into _comment_id_response2;
|
||||
|
||||
@@ -41,7 +41,7 @@ begin
|
||||
perform vote(
|
||||
reference => 'article'::regclass,
|
||||
_target_id => (created_article->>'id')::uuid,
|
||||
_citizen_id => _citizen_id,
|
||||
_created_by_id => _citizen_id,
|
||||
_note => 1
|
||||
);
|
||||
assert (select count(*) = 1 from vote_for_article), 'vote must be inserted';
|
||||
@@ -50,7 +50,7 @@ begin
|
||||
perform vote(
|
||||
reference => 'article'::regclass,
|
||||
_target_id => (created_article->>'id')::uuid,
|
||||
_citizen_id => _citizen_id,
|
||||
_created_by_id => _citizen_id,
|
||||
_note => -1
|
||||
);
|
||||
assert (select count(*) = 1 from vote_for_article), 'vote must be inserted';
|
||||
@@ -60,7 +60,7 @@ begin
|
||||
perform vote(
|
||||
reference => 'article'::regclass,
|
||||
_target_id => (created_article->>'id')::uuid,
|
||||
_citizen_id => _citizen_id,
|
||||
_created_by_id => _citizen_id,
|
||||
_note => -10
|
||||
);
|
||||
assert false, 'vote must be throw exception if note is not -1, 0 or 1';
|
||||
|
||||
Reference in New Issue
Block a user