1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-31 18:31:01 +00:00

Refactor feed creation to allow setting most fields via API

Allow API clients to create disabled feeds or define field like "ignore_http_cache".
This commit is contained in:
Frédéric Guillot 2021-01-02 16:33:41 -08:00 committed by fguillot
parent ab82c4b300
commit f0610bdd9c
26 changed files with 370 additions and 264 deletions

View file

@ -100,7 +100,10 @@ func TestFilterEntriesByCategory(t *testing.T) {
t.Fatal(err)
}
feedID, err := client.CreateFeed(testFeedURL, category.ID)
feedID, err := client.CreateFeed(&miniflux.FeedCreationRequest{
FeedURL: testFeedURL,
CategoryID: category.ID,
})
if err != nil {
t.Fatal(err)
}
@ -134,7 +137,10 @@ func TestFilterEntriesByStatuses(t *testing.T) {
t.Fatal(err)
}
feedID, err := client.CreateFeed(testFeedURL, category.ID)
feedID, err := client.CreateFeed(&miniflux.FeedCreationRequest{
FeedURL: testFeedURL,
CategoryID: category.ID,
})
if err != nil {
t.Fatal(err)
}
@ -181,7 +187,10 @@ func TestSearchEntries(t *testing.T) {
t.Fatal(err)
}
feedID, err := client.CreateFeed(testFeedURL, categories[0].ID)
feedID, err := client.CreateFeed(&miniflux.FeedCreationRequest{
FeedURL: testFeedURL,
CategoryID: categories[0].ID,
})
if err != nil {
t.Fatal(err)
}