Documentation ¶
Index ¶
- func ExcludeOperations(ops ...Operation) testOption
- func IgnorePostAssertForOperations(ops ...Operation) testOption
- func JSONComparer(...) testOption
- func RemoveFieldFromJSONResource(field, jsonResource string) string
- func TestResourceType(t *testing.T, rt ResourceTypeTest, opts ...testOption)
- func TestResourceTypeOperations(t *testing.T, rt ResourceTypeTest, operations []operationTester)
- func TestResourceTypeWithErrorOperations(t *testing.T, rt ResourceTypeTest)
- type Operation
- type ResourceTypeTest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExcludeOperations ¶
func ExcludeOperations(ops ...Operation) testOption
func IgnorePostAssertForOperations ¶
func IgnorePostAssertForOperations(ops ...Operation) testOption
func JSONComparer ¶
func TestResourceType ¶
func TestResourceType(t *testing.T, rt ResourceTypeTest, opts ...testOption)
func TestResourceTypeOperations ¶
func TestResourceTypeOperations(t *testing.T, rt ResourceTypeTest, operations []operationTester)
func TestResourceTypeWithErrorOperations ¶
func TestResourceTypeWithErrorOperations(t *testing.T, rt ResourceTypeTest)
Types ¶
type Operation ¶
type Operation string
const OperationCreateInternalError Operation = "CreateInternalError"
const OperationCreateNoID Operation = "CreateNoID"
const OperationCreateSuccess Operation = "CreateSuccess"
const OperationDeleteInternalError Operation = "DeleteInternalError"
const OperationDeleteNotFound Operation = "DeleteNotFound"
const OperationDeleteSuccess Operation = "DeleteSuccess"
const OperationGetAugmentedSuccess Operation = "GetAugmentedSuccess"
const OperationGetInternalError Operation = "GetInternalError"
const OperationGetNotFound Operation = "GetNotFound"
const OperationGetSuccess Operation = "GetSuccess"
const OperationListAugmentedSuccess Operation = "ListAugmentedSuccess"
const OperationListInternalError Operation = "ListInternalError"
const OperationListNoResults Operation = "ListNoResults"
const OperationListSortSuccess Operation = "ListSortSuccess"
const OperationListSuccess Operation = "ListSuccess"
const OperationListWithInvalidSortField Operation = "ListWithInvalidSortField"
const OperationUpdateInternalError Operation = "UpdateInternalError"
const OperationUpdateNotFound Operation = "UpdateNotFound"
const OperationUpdateSuccess Operation = "UpdateSuccess"
type ResourceTypeTest ¶
type ResourceTypeTest struct { ResourceTypeSingular string ResourceTypePlural string RegisterManagerFn func(*mux.Router, *sql.DB) rm.Manager Prepare func(t *testing.T, operation Operation, manager rm.Manager) SampleJSON string SampleJSONUpdated string SampleJSONAugmented string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.