chg: backend: error struct
This commit is contained in:
@@ -86,7 +86,7 @@ func getSubscriptionData() []RegisterSubscriptionTest {
|
||||
return []RegisterSubscriptionTest{
|
||||
{
|
||||
Name: "Missing details should fail",
|
||||
WantResponse: http.StatusNotAcceptable,
|
||||
WantResponse: http.StatusBadRequest,
|
||||
WantDBData: map[string]interface{}{"name": "Just a Subscription"},
|
||||
Assert: false,
|
||||
Input: GenerateInputJSON(
|
||||
@@ -97,7 +97,7 @@ func getSubscriptionData() []RegisterSubscriptionTest {
|
||||
},
|
||||
{
|
||||
Name: "Missing model name should fail",
|
||||
WantResponse: http.StatusNotAcceptable,
|
||||
WantResponse: http.StatusBadRequest,
|
||||
WantDBData: map[string]interface{}{"name": ""},
|
||||
Assert: false,
|
||||
Input: GenerateInputJSON(
|
||||
@@ -108,7 +108,7 @@ func getSubscriptionData() []RegisterSubscriptionTest {
|
||||
},
|
||||
{
|
||||
Name: "Negative monthly fee should fail",
|
||||
WantResponse: http.StatusNotAcceptable,
|
||||
WantResponse: http.StatusBadRequest,
|
||||
WantDBData: map[string]interface{}{"name": "Premium"},
|
||||
Assert: false,
|
||||
Input: GenerateInputJSON(customizeSubscription(func(sub MembershipData) MembershipData {
|
||||
@@ -118,7 +118,7 @@ func getSubscriptionData() []RegisterSubscriptionTest {
|
||||
},
|
||||
{
|
||||
Name: "Negative hourly rate should fail",
|
||||
WantResponse: http.StatusNotAcceptable,
|
||||
WantResponse: http.StatusBadRequest,
|
||||
WantDBData: map[string]interface{}{"name": "Premium"},
|
||||
Assert: false,
|
||||
Input: GenerateInputJSON(customizeSubscription(func(sub MembershipData) MembershipData {
|
||||
|
||||
Reference in New Issue
Block a user