refactor product domain models
This commit is contained in:
@@ -28,6 +28,8 @@ func TestExpectedResources(t *testing.T) {
|
||||
assertContract(t, ExpectedResources(), "ec", "ec_order_item", Writable, "list")
|
||||
assertContract(t, ExpectedResources(), "wallet", "wallet_ledger", ReadOnly, "list")
|
||||
assertContract(t, ExpectedResources(), "delivery", "delivery_track_point", ReadOnly, "list")
|
||||
assertContract(t, ExpectedResources(), "product", "product_info", Editable, "list")
|
||||
assertContract(t, ExpectedResources(), "product", "product_owner", AppendOnly, "list")
|
||||
}
|
||||
|
||||
func TestContentUsesCMSResourceAndRemovedDomainsAreAbsent(t *testing.T) {
|
||||
@@ -91,6 +93,11 @@ func TestResourceDefinitionAllowsOnlyMethodsForEachMode(t *testing.T) {
|
||||
{"append-only GET", AppendOnly, http.MethodGet, true},
|
||||
{"append-only POST", AppendOnly, http.MethodPost, true},
|
||||
{"append-only PUT", AppendOnly, http.MethodPut, false},
|
||||
{"editable GET", Editable, http.MethodGet, true},
|
||||
{"editable POST", Editable, http.MethodPost, true},
|
||||
{"editable PUT", Editable, http.MethodPut, true},
|
||||
{"editable PATCH", Editable, http.MethodPatch, true},
|
||||
{"editable DELETE", Editable, http.MethodDelete, false},
|
||||
{"writable GET", Writable, http.MethodGet, true},
|
||||
{"writable POST", Writable, http.MethodPost, true},
|
||||
{"writable PUT", Writable, http.MethodPut, true},
|
||||
|
||||
Reference in New Issue
Block a user