12 lines
224 B
Go
12 lines
224 B
Go
package models
|
|
|
|
import "testing"
|
|
|
|
func TestCannotCreateUntenanted(t *testing.T) {
|
|
tnt := Tenanted{}
|
|
|
|
if err := tnt.BeforeCreate(nil); err == nil {
|
|
t.Errorf("allowed creation of Tenanted model without Tenant value")
|
|
}
|
|
}
|