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:
2025-05-25 13:43:24 +02:00
parent f8d1f195de
commit a8e3332723
6 changed files with 88 additions and 7 deletions

View File

@@ -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) {