(t *testing.T)
| 824 | } |
| 825 | |
| 826 | func TestTopicUpdateOnMessage(t *testing.T) { |
| 827 | msg := types.Message{ |
| 828 | ObjHeader: types.ObjHeader{ |
| 829 | CreatedAt: testData.Now.Add(33 * time.Minute), |
| 830 | }, |
| 831 | SeqId: 66, |
| 832 | } |
| 833 | err := adp.TopicUpdateOnMessage(testData.Topics[2].Id, &msg) |
| 834 | if err != nil { |
| 835 | t.Fatal(err) |
| 836 | } |
| 837 | |
| 838 | cursor, err := rdb.Table("topics").Get(testData.Topics[2].Id). |
| 839 | Pluck("TouchedAt", "SeqId").Run(conn) |
| 840 | if err != nil { |
| 841 | t.Fatal(err) |
| 842 | } |
| 843 | defer cursor.Close() |
| 844 | |
| 845 | var got struct { |
| 846 | TouchedAt time.Time |
| 847 | SeqId int |
| 848 | } |
| 849 | if err = cursor.One(&got); err != nil { |
| 850 | t.Fatal(err) |
| 851 | } |
| 852 | if !got.TouchedAt.Equal(msg.CreatedAt) || got.SeqId != msg.SeqId { |
| 853 | t.Error(mismatchErrorString("TouchedAt", got.TouchedAt, msg.CreatedAt)) |
| 854 | t.Error(mismatchErrorString("SeqId", got.SeqId, msg.SeqId)) |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | func TestTopicUpdate(t *testing.T) { |
| 859 | update := map[string]any{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…