(t *testing.T)
| 856 | } |
| 857 | |
| 858 | func TestTopicUpdate(t *testing.T) { |
| 859 | update := map[string]any{ |
| 860 | "UpdatedAt": testData.Now.Add(55 * time.Minute), |
| 861 | } |
| 862 | err := adp.TopicUpdate(testData.Topics[0].Id, update) |
| 863 | if err != nil { |
| 864 | t.Fatal(err) |
| 865 | } |
| 866 | |
| 867 | cursor, err := rdb.Table("topics").Get(testData.Topics[0].Id).Field("UpdatedAt").Run(conn) |
| 868 | if err != nil { |
| 869 | t.Fatal(err) |
| 870 | } |
| 871 | defer cursor.Close() |
| 872 | |
| 873 | var got time.Time |
| 874 | if err = cursor.One(&got); err != nil { |
| 875 | t.Fatal(err) |
| 876 | } |
| 877 | if !got.Equal(update["UpdatedAt"].(time.Time)) { |
| 878 | t.Error(mismatchErrorString("UpdatedAt", got, update["UpdatedAt"])) |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | func TestTopicUpdateSubCnt(t *testing.T) { |
| 883 | // Test RethinkDB specific method |
nothing calls this directly
no test coverage detected
searching dependent graphs…