diff options
Diffstat (limited to 'bug/operation_pack_test.go')
-rw-r--r-- | bug/operation_pack_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bug/operation_pack_test.go b/bug/operation_pack_test.go index 09d159af..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) - ensureHash(t, opp) + ensureIDs(t, opp) assert.Equal(t, opp, opp2) } -func ensureHash(t *testing.T, opp *OperationPack) { +func ensureIDs(t *testing.T, opp *OperationPack) { for _, op := range opp.Operations { - _, err := op.Hash() - require.NoError(t, err) + id := op.Id() + require.NoError(t, id.Validate()) + id = op.GetAuthor().Id() + require.NoError(t, id.Validate()) } } |