(t *testing.T, data interface{}, relations ...Relation)
| 11 | ) |
| 12 | |
| 13 | func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) { |
| 14 | if s, err := schema.Parse(data, &sync.Map{}, schema.NamingStrategy{}); err != nil { |
| 15 | t.Errorf("Failed to parse schema, got error %v", err) |
| 16 | } else { |
| 17 | for _, rel := range relations { |
| 18 | checkSchemaRelation(t, s, rel) |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | func TestBelongsToOverrideForeignKey(t *testing.T) { |
| 24 | type Profile struct { |
no test coverage detected