(t *testing.T)
| 862 | } |
| 863 | |
| 864 | func TestTopicUpdateSubCnt(t *testing.T) { |
| 865 | // Test PostgreSQL specific method |
| 866 | err := adp.TopicUpdateSubCnt(testData.Topics[0].Id) |
| 867 | if err != nil { |
| 868 | t.Fatal(err) |
| 869 | } |
| 870 | |
| 871 | // Verify the subscription count was updated correctly |
| 872 | var subcnt int |
| 873 | err = db.QueryRow(ctx, "SELECT subcnt FROM topics WHERE name=$1", testData.Topics[0].Id).Scan(&subcnt) |
| 874 | if err != nil { |
| 875 | t.Fatal(err) |
| 876 | } |
| 877 | // Should match the number of active subscriptions |
| 878 | if subcnt < 0 { |
| 879 | t.Error("Subscription count should be non-negative") |
| 880 | } |
| 881 | } |
| 882 | |
| 883 | func TestTopicOwnerChange(t *testing.T) { |
| 884 | err := adp.TopicOwnerChange(testData.Topics[0].Id, types.ParseUserId("usr"+testData.Users[1].Id)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…