mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 23:32:47 +01:00
22 lines
453 B
Go
22 lines
453 B
Go
package database_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/SecurityBrewery/catalyst/app/database"
|
|
"github.com/SecurityBrewery/catalyst/app/database/sqlc"
|
|
)
|
|
|
|
func TestDBForeignKeyConstraints(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
queries := database.TestDB(t, t.TempDir())
|
|
|
|
assert.Error(t, queries.AssignGroupToUser(t.Context(), sqlc.AssignGroupToUserParams{
|
|
UserID: "does_not_exist",
|
|
GroupID: "also_missing",
|
|
}))
|
|
}
|