A social RSS reader built on the AT Protocol. glean.at
glean atproto atmosphere rss feed social app
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix unit test

+6 -1
+6 -1
internal/cluster/jaccard_test.go
··· 44 44 {"https://b.com/feed", "Feed B"}, 45 45 {"https://c.com/feed", "Feed C"}, 46 46 {"https://d.com/feed", "Feed D"}, 47 + {"https://e.com/feed", "Feed E"}, 47 48 } 48 49 for _, f := range feeds { 49 - _, err := database.ExecContext(ctx, `INSERT INTO feeds (feed_url, title, site_url, description, feed_type) VALUES (?, ?, ?, '', 'rss')`, f.url, f.title, f.url) 50 + _, err := database.ExecContext(ctx, `INSERT INTO feeds (feed_url, title, site_url, description, feed_type, subscriber_count) VALUES (?, ?, ?, '', 'rss', 2)`, f.url, f.title, f.url) 50 51 assert.NilError(t, err) 51 52 } 52 53 ··· 54 55 {"did:test:alice", "https://a.com/feed"}, 55 56 {"did:test:alice", "https://b.com/feed"}, 56 57 {"did:test:alice", "https://c.com/feed"}, 58 + {"did:test:alice", "https://d.com/feed"}, 59 + {"did:test:alice", "https://e.com/feed"}, 57 60 {"did:test:bob", "https://a.com/feed"}, 58 61 {"did:test:bob", "https://b.com/feed"}, 59 62 {"did:test:bob", "https://d.com/feed"}, ··· 424 427 ctx := context.Background() 425 428 database := setupClusterTestDB(t) 426 429 seedClusterData(t, ctx, database) 430 + seedFollowData(t, ctx, database) 427 431 428 432 engine := NewEngine(database.DB, slog.Default()) 433 + assert.NilError(t, engine.ComputeFollowDistances(ctx)) 429 434 430 435 recs, err := engine.ColdStartRecommendations(ctx, "did:test:alice", 10) 431 436 assert.NilError(t, err)