test(leaderboard): catch fixtures up to event-feedback +5 and auto-connect
This commit is contained in:
1 parent
1f4b9d2beb
commit
6a3b70a330
1 file changed
+8
-1
@@ -136,10 +136,17 @@ begin
|
|||||||
perform public.checkin_attendee(talk_two, '[email protected]');
|
perform public.checkin_attendee(talk_two, '[email protected]');
|
||||||
perform set_config('request.jwt.claims', '{"email":"[email protected]"}', true);
|
perform set_config('request.jwt.claims', '{"email":"[email protected]"}', true);
|
||||||
perform pg_temp.assert_board((select earned = 10 and points = 35 from public.submit_feedback(talk_two, 5, 'Useful')), 'comment awards ten');
|
perform pg_temp.assert_board((select earned = 10 and points = 35 from public.submit_feedback(talk_two, 5, 'Useful')), 'comment awards ten');
|
||||||
perform pg_temp.assert_board((select points = 35 from public.submit_event_feedback(5, 'Good event')), 'event feedback does not award points');
|
-- 20261020130000: the FIRST event feedback awards +5 to eligible attendees;
|
||||||
|
-- editing it afterwards earns nothing.
|
||||||
|
perform pg_temp.assert_board((select earned = 5 and points = 40 from public.submit_event_feedback(5, 'Good event')), 'first event feedback awards five');
|
||||||
|
perform pg_temp.assert_board((select earned = 0 and points = 40 from public.submit_event_feedback(4, 'Edited')), 'event feedback edit earns nothing');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
|
-- Clear any pairs the auto-connect rules created during the check-ins above so
|
||||||
|
-- the explicit fixture inserts below are deterministic.
|
||||||
|
delete from public.connections where event_id = 'a0150000-0000-0000-0000-000000000001';
|
||||||
|
|
||||||
insert into public.connections (id, event_id, from_email, to_email)
|
insert into public.connections (id, event_id, from_email, to_email)
|
||||||
values ('a0150000-0000-0000-0000-000000000021', 'a0150000-0000-0000-0000-000000000001', '[email protected]', '[email protected]'),
|
values ('a0150000-0000-0000-0000-000000000021', 'a0150000-0000-0000-0000-000000000001', '[email protected]', '[email protected]'),
|
||||||
('a0150000-0000-0000-0000-000000000022', 'a0150000-0000-0000-0000-000000000001', '[email protected]', '[email protected]'),
|
('a0150000-0000-0000-0000-000000000022', 'a0150000-0000-0000-0000-000000000001', '[email protected]', '[email protected]'),
|
||||||
|
|||||||
Reference in new issue
Block a user