add votes to article

This commit is contained in:
2019-09-18 01:06:40 +02:00
parent a5b55c2d87
commit acc6ecf114
8 changed files with 52 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ declare
]
}
$json$;
votes jsonb;
begin
-- insert user for context
select insert_user(created_user) into created_user;
@@ -67,6 +68,8 @@ begin
exception when check_violation then
end;
select count_vote('article', '933b6a1b-50c9-42b6-989f-c02a57814ef9') into votes;
assert ((votes->>'up')::int = 0), 'vote.up must be 0';
-- delete vote and context
delete from vote;