优化结构
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package payment
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestDefinitionOwnsPaymentContributions(t *testing.T) {
|
||||
definition := Definition()
|
||||
if definition.Name != "payment" {
|
||||
t.Fatalf("name = %q, want payment", definition.Name)
|
||||
}
|
||||
if len(definition.Migrations) != 2 {
|
||||
t.Fatalf("migrations = %d, want 2", len(definition.Migrations))
|
||||
}
|
||||
if len(definition.Surface.Menus) != 2 || len(definition.Surface.APIs) != 10 {
|
||||
t.Fatalf("surface = %d menus/%d APIs, want 2/10", len(definition.Surface.Menus), len(definition.Surface.APIs))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user