Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Apr 4, 2022
1 parent f38c1b3 commit 7f7487e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/models/groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
1 change: 1 addition & 0 deletions core/models/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit 7f7487e

Please sign in to comment.