Change timestamp condition
This commit is contained in:
parent
2958e32636
commit
2489e19bab
@ -264,7 +264,7 @@ func (ot *objectTree) prepareBuilderContent(content SignableChangeContent) (cnt
|
||||
PrivKey: content.Key,
|
||||
ReadKey: readKey,
|
||||
Content: content.Data,
|
||||
Timestamp: content.Timestamp,
|
||||
Timestamp: timestamp,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ func TestObjectTree(t *testing.T) {
|
||||
require.Equal(t, res.Added[0].Id, oTree.Heads()[0])
|
||||
ch, err := oTree.(*objectTree).changeBuilder.Unmarshall(res.Added[0], true)
|
||||
require.NoError(t, err)
|
||||
require.NotEqual(t, ch.Timestamp, 0)
|
||||
require.NotZero(t, ch.Timestamp)
|
||||
})
|
||||
t.Run("timestamp is set correctly", func(t *testing.T) {
|
||||
someTs := time.Now().Add(time.Hour).Unix()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user