Fix obligation type not updated
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
ad1998a540
commit
74fa10faea
@@ -39,6 +39,7 @@ func TestObligation_Create(t *testing.T) {
|
||||
requirement
|
||||
regulator
|
||||
status
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,6 +56,7 @@ func TestObligation_Create(t *testing.T) {
|
||||
Requirement string `json:"requirement"`
|
||||
Regulator string `json:"regulator"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
} `json:"node"`
|
||||
} `json:"obligationEdge"`
|
||||
} `json:"createObligation"`
|
||||
@@ -80,6 +82,7 @@ func TestObligation_Create(t *testing.T) {
|
||||
assert.Equal(t, "Data must be processed lawfully", result.CreateObligation.ObligationEdge.Node.Requirement)
|
||||
assert.Equal(t, "ICO", result.CreateObligation.ObligationEdge.Node.Regulator)
|
||||
assert.Equal(t, "NON_COMPLIANT", result.CreateObligation.ObligationEdge.Node.Status)
|
||||
assert.Equal(t, "LEGAL", result.CreateObligation.ObligationEdge.Node.Type)
|
||||
}
|
||||
|
||||
func TestObligation_Update(t *testing.T) {
|
||||
@@ -130,6 +133,7 @@ func TestObligation_Update(t *testing.T) {
|
||||
id
|
||||
area
|
||||
status
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,6 +145,7 @@ func TestObligation_Update(t *testing.T) {
|
||||
ID string `json:"id"`
|
||||
Area string `json:"area"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
} `json:"obligation"`
|
||||
} `json:"updateObligation"`
|
||||
}
|
||||
@@ -150,6 +155,7 @@ func TestObligation_Update(t *testing.T) {
|
||||
"id": obligationID,
|
||||
"area": "Updated Area",
|
||||
"status": "COMPLIANT",
|
||||
"type": "CONTRACTUAL",
|
||||
},
|
||||
}, &result)
|
||||
require.NoError(t, err)
|
||||
@@ -157,6 +163,7 @@ func TestObligation_Update(t *testing.T) {
|
||||
assert.Equal(t, obligationID, result.UpdateObligation.Obligation.ID)
|
||||
assert.Equal(t, "Updated Area", result.UpdateObligation.Obligation.Area)
|
||||
assert.Equal(t, "COMPLIANT", result.UpdateObligation.Obligation.Status)
|
||||
assert.Equal(t, "CONTRACTUAL", result.UpdateObligation.Obligation.Type)
|
||||
}
|
||||
|
||||
func TestObligation_Delete(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user