sourcegraph/internal/database/code_monitor_recipient_test.go
Camden Cheek c836d6a333
Backend: remove EnterpriseDB (#54699)
This moves a bunch of stuff out of enterprise. Notably, the final result
is `EnterpriseDB` no longer exists. This is one of the biggest sticking
points for moving other stuff out of the `enterprise` directory, so this
should help speed up future cleanups.
2023-07-06 20:03:31 -06:00

19 lines
415 B
Go

package database
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestListRecipients(t *testing.T) {
ctx, db, s := newTestStore(t)
_, _, userCTX := newTestUser(ctx, t, db)
fixtures := s.insertTestMonitor(userCTX, t)
rs, err := s.ListRecipients(ctx, ListRecipientsOpts{EmailID: &fixtures.emails[0].ID})
require.NoError(t, err)
require.Equal(t, []*Recipient{fixtures.recipients[0]}, rs)
}