From 7f7487e041dfa444df2d454e6be1c55040e76b05 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Mon, 4 Apr 2022 17:30:25 -0500 Subject: [PATCH] Fix tests --- core/models/groups_test.go | 7 ++++++- core/models/search_test.go | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/models/groups_test.go b/core/models/groups_test.go index 8917aa77b..e881dac9c 100644 --- a/core/models/groups_test.go +++ b/core/models/groups_test.go @@ -40,12 +40,17 @@ func TestLoadGroups(t *testing.T) { name string query string }{ + {testdata.ActiveGroup.ID, testdata.ActiveGroup.UUID, "Active", ""}, + {testdata.ArchivedGroup.ID, testdata.ArchivedGroup.UUID, "Archived", ""}, + {testdata.BlockedGroup.ID, testdata.BlockedGroup.UUID, "Blocked", ""}, {testdata.DoctorsGroup.ID, testdata.DoctorsGroup.UUID, "Doctors", ""}, {testdata.OpenTicketsGroup.ID, testdata.OpenTicketsGroup.UUID, "Open Tickets", "tickets > 0"}, + {testdata.StoppedGroup.ID, testdata.StoppedGroup.UUID, "Stopped", ""}, {testdata.TestersGroup.ID, testdata.TestersGroup.UUID, "Testers", ""}, } - assert.Equal(t, 3, len(groups)) + assert.Equal(t, 7, len(groups)) + for i, tc := range tcs { group := groups[i].(*models.Group) assert.Equal(t, tc.uuid, group.UUID()) diff --git a/core/models/search_test.go b/core/models/search_test.go index 702d5719d..92a63320b 100644 --- a/core/models/search_test.go +++ b/core/models/search_test.go @@ -228,6 +228,7 @@ func TestGetContactIDsForQueryPage(t *testing.T) { ExpectedTotal: 1, }, { + Group: testdata.ActiveGroup, Query: "goats > 2", // no such contact field ExpectedError: "error parsing query: goats > 2: can't resolve 'goats' to attribute, scheme or field", },