Update seen service to allow overriding values

This commit is contained in:
Ben Toogood
2021-02-04 12:47:19 +00:00
parent 6ca55ba18d
commit d67554b63c
3 changed files with 29 additions and 6 deletions

View File

@@ -74,6 +74,13 @@ func TestSet(t *testing.T) {
ResourceID: uuid.New().String(),
ResourceType: "message",
},
{
Name: "WithUpdatedTimetamp",
UserID: uuid.New().String(),
ResourceID: uuid.New().String(),
ResourceType: "message",
Timestamp: timestamppb.New(time.Now().Add(time.Minute * -3)),
},
}
h := testHandler(t)
@@ -164,6 +171,12 @@ func TestRead(t *testing.T) {
ResourceType string
Timestamp *timestamppb.Timestamp
}{
{
UserID: "user-1",
ResourceID: "message-1",
ResourceType: "message",
Timestamp: timestamppb.New(tn.Add(time.Minute * -10)),
},
{
UserID: "user-1",
ResourceID: "message-1",