Add support for colour attribute on allowances in backend (#77)
Closes #76 Reviewed-on: #77
This commit was merged in pull request #77.
This commit is contained in:
@@ -516,6 +516,7 @@ func TestPutAllowanceById(t *testing.T) {
|
||||
"name": TestAllowanceName,
|
||||
"target": 5000,
|
||||
"weight": 10,
|
||||
"colour": "#FF5733",
|
||||
}
|
||||
resp := e.POST("/user/1/allowance").WithJSON(requestBody).Expect().Status(201).JSON().Object()
|
||||
allowanceId := int(resp.Value("id").Number().Raw())
|
||||
@@ -525,6 +526,7 @@ func TestPutAllowanceById(t *testing.T) {
|
||||
"name": "Updated Allowance",
|
||||
"target": 6000,
|
||||
"weight": 15,
|
||||
"colour": "#3357FF",
|
||||
}
|
||||
e.PUT("/user/1/allowance/" + strconv.Itoa(allowanceId)).WithJSON(updateRequest).Expect().Status(200)
|
||||
|
||||
@@ -534,6 +536,7 @@ func TestPutAllowanceById(t *testing.T) {
|
||||
result.Value("name").IsEqual("Updated Allowance")
|
||||
result.Value("target").IsEqual(6000)
|
||||
result.Value("weight").IsEqual(15)
|
||||
result.Value("colour").IsEqual("#3357FF")
|
||||
}
|
||||
|
||||
func TestCompleteTask(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user