mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Split integration tests into multiple files
This commit is contained in:
parent
df2bebaf3d
commit
febce4f2e3
11 changed files with 1329 additions and 1267 deletions
35
tests/subscription_test.go
Normal file
35
tests/subscription_test.go
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build integration
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDiscoverSubscriptions(t *testing.T) {
|
||||
client := createClient(t)
|
||||
subscriptions, err := client.Discover(testWebsiteURL)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(subscriptions) != 1 {
|
||||
t.Fatalf(`Invalid number of subscriptions, got "%v" instead of "%v"`, len(subscriptions), 2)
|
||||
}
|
||||
|
||||
if subscriptions[0].Title != testFeedTitle {
|
||||
t.Fatalf(`Invalid feed title, got "%v" instead of "%v"`, subscriptions[0].Title, testFeedTitle)
|
||||
}
|
||||
|
||||
if subscriptions[0].Type != "atom" {
|
||||
t.Fatalf(`Invalid feed type, got "%v" instead of "%v"`, subscriptions[0].Type, "atom")
|
||||
}
|
||||
|
||||
if subscriptions[0].URL != testFeedURL {
|
||||
t.Fatalf(`Invalid feed URL, got "%v" instead of "%v"`, subscriptions[0].URL, testFeedURL)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue