1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Add per feed cookies option

This commit is contained in:
Darius 2021-03-23 04:27:58 +01:00 committed by GitHub
parent b0c14aa8f9
commit 9242350f0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 114 additions and 15 deletions

View file

@ -531,6 +531,31 @@ func TestUpdateFeedUserAgent(t *testing.T) {
}
}
func TestUpdateFeedCookie(t *testing.T) {
client := createClient(t)
feed, _ := createFeed(t, client)
cookie := "test"
updatedFeed, err := client.UpdateFeed(feed.ID, &miniflux.FeedModificationRequest{Cookie: &cookie})
if err != nil {
t.Fatal(err)
}
if updatedFeed.Cookie != cookie {
t.Fatalf(`Wrong Cookie value, got "%v" instead of "%v"`, updatedFeed.Cookie, cookie)
}
cookie = ""
updatedFeed, err = client.UpdateFeed(feed.ID, &miniflux.FeedModificationRequest{Cookie: &cookie})
if err != nil {
t.Fatal(err)
}
if updatedFeed.Cookie != cookie {
t.Fatalf(`Wrong Cookie value, got "%v" instead of "%v"`, updatedFeed.Cookie, cookie)
}
}
func TestUpdateFeedUsername(t *testing.T) {
client := createClient(t)
feed, _ := createFeed(t, client)