aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_pack_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/operation_pack_test.go')
-rw-r--r--bug/operation_pack_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/bug/operation_pack_test.go b/bug/operation_pack_test.go
index 713be7f0..21ac0a00 100644
--- a/bug/operation_pack_test.go
+++ b/bug/operation_pack_test.go
@@ -48,14 +48,16 @@ func TestOperationPackSerialize(t *testing.T) {
err = json.Unmarshal(data, &opp2)
assert.NoError(t, err)
- ensureID(t, opp)
+ ensureIDs(t, opp)
assert.Equal(t, opp, opp2)
}
-func ensureID(t *testing.T, opp *OperationPack) {
+func ensureIDs(t *testing.T, opp *OperationPack) {
for _, op := range opp.Operations {
- id := op.ID()
- require.True(t, IDIsValid(id))
+ id := op.Id()
+ require.NoError(t, id.Validate())
+ id = op.GetAuthor().Id()
+ require.NoError(t, id.Validate())
}
}