package idear import "testing" // TestModels checks that models (unexported — see Schema's doc // comment for why an app must never be handed this list) returns // pointers to both idear model types, in the shape idear's own tests // use to check Schema and the struct tags agree. func TestModels(t *testing.T) { got := models() if len(got) != 2 { t.Fatalf("len(models()) = %d, want 2", len(got)) } if _, ok := got[0].(*Member); !ok { t.Errorf("models()[0] = %T, want *Member", got[0]) } if _, ok := got[1].(*Invitation); !ok { t.Errorf("models()[1] = %T, want *Invitation", got[1]) } }