Skip to content

Commit b10d610

Browse files
committed
Adding more fixtures to appease the test
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 25636ec commit b10d610

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

coderd/database/migrations/testdata/fixtures/000219_notifications.up.sql

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22

33
DO
44
$$
5-
DECLARE
6-
template text;
7-
BEGIN
8-
SELECT 'You successfully did {{.thing}}!' INTO template;
5+
DECLARE
6+
template text;
7+
BEGIN
8+
SELECT 'You successfully did {{.thing}}!' INTO template;
99

10-
INSERT INTO notification_templates (id, name, enabled, title_template, body_template, "group")
11-
VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'A', TRUE, template, template, 'Group 1'),
12-
('b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12', 'B', TRUE, template, template, 'Group 1'),
13-
('c0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13', 'C', TRUE, template, template, 'Group 2');
10+
INSERT INTO notification_templates (id, name, enabled, title_template, body_template, "group")
11+
VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'A', TRUE, template, template, 'Group 1'),
12+
('b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12', 'B', TRUE, template, template, 'Group 1'),
13+
('c0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13', 'C', TRUE, template, template, 'Group 2');
1414

15-
END
15+
INSERT INTO public.users(id, email, username, hashed_password, created_at, updated_at, status, rbac_roles, deleted)
16+
VALUES ('fc1511ef-4fcf-4a3b-98a1-8df64160e35a', 'githubuser@coder.com', 'githubuser', '\x', '2022-11-02 13:05:21.445455+02', '2022-11-02 13:05:21.445455+02', 'active', '{}', false) ON CONFLICT DO NOTHING;
17+
18+
INSERT INTO notification_messages (id, notification_template_id, user_id, method, created_by, payload)
19+
VALUES (
20+
gen_random_uuid(), 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'fc1511ef-4fcf-4a3b-98a1-8df64160e35a', 'smtp'::notification_method, 'test', '{}'
21+
);
22+
END
1623
$$;

0 commit comments

Comments
 (0)