fix duplicate follow
This commit is contained in:
@@ -57,7 +57,7 @@ begin
|
||||
assert (select count(*) = 1 from "comment"), 'edit comment must not insert new comment';
|
||||
assert (select count(*) = 1 from "comment" where content = 'edited'), 'edit comment must not insert new comment';
|
||||
|
||||
-- delete article and context
|
||||
-- delete comment and context
|
||||
delete from "comment";
|
||||
delete from article;
|
||||
delete from citizen;
|
||||
|
||||
@@ -38,13 +38,16 @@ begin
|
||||
_citizen_id2 := created_citizen2->>'id';
|
||||
|
||||
|
||||
perform follow('citizen'::regclass, _citizen_id, _citizen_id2);
|
||||
assert (select count(*) > 0 from follow), 'follow must be inserted';
|
||||
|
||||
perform follow('citizen'::regclass, _citizen_id, _citizen_id2);
|
||||
assert (select count(*) > 0 from follow), 'follow must be inserted';
|
||||
|
||||
perform unfollow('citizen'::regclass, _citizen_id, _citizen_id2);
|
||||
assert (select count(*) = 0 from follow), 'follow must be deleted after unfollow';
|
||||
|
||||
-- delete article and context
|
||||
-- delete follow and context
|
||||
delete from citizen;
|
||||
delete from "user";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user