(t *testing.T)
| 818 | } |
| 819 | |
| 820 | func TestTopicUpdateOnMessage(t *testing.T) { |
| 821 | msg := types.Message{ |
| 822 | ObjHeader: types.ObjHeader{ |
| 823 | CreatedAt: testData.Now.Add(33 * time.Minute), |
| 824 | }, |
| 825 | SeqId: 66, |
| 826 | } |
| 827 | err := adp.TopicUpdateOnMessage(testData.Topics[2].Id, &msg) |
| 828 | if err != nil { |
| 829 | t.Fatal(err) |
| 830 | } |
| 831 | var got struct { |
| 832 | TouchedAt time.Time |
| 833 | SeqId int |
| 834 | } |
| 835 | err = db.QueryRow(ctx, "SELECT touchedat, seqid FROM topics WHERE name=$1", testData.Topics[2].Id). |
| 836 | Scan(&got.TouchedAt, &got.SeqId) |
| 837 | if err != nil { |
| 838 | t.Fatal(err) |
| 839 | } |
| 840 | if got.TouchedAt != msg.CreatedAt || got.SeqId != msg.SeqId { |
| 841 | t.Error(mismatchErrorString("TouchedAt", got.TouchedAt, msg.CreatedAt)) |
| 842 | t.Error(mismatchErrorString("SeqId", got.SeqId, msg.SeqId)) |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | func TestTopicUpdate(t *testing.T) { |
| 847 | update := map[string]any{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…