mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add integration test for export API endpoint
This commit is contained in:
parent
4aec2453f4
commit
631e0a2e20
5 changed files with 62 additions and 9 deletions
|
@ -634,6 +634,25 @@ func TestCreateFeedWithInexistingCategory(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestExport(t *testing.T) {
|
||||
username := getRandomUsername()
|
||||
client := miniflux.NewClient(testBaseURL, testAdminUsername, testAdminPassword)
|
||||
_, err := client.CreateUser(username, testStandardPassword, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
client = miniflux.NewClient(testBaseURL, username, testStandardPassword)
|
||||
output, err := client.Export()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(string(output), "<?xml") {
|
||||
t.Fatalf(`Invalid OPML export, got "%s"`, string(output))
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateFeed(t *testing.T) {
|
||||
username := getRandomUsername()
|
||||
client := miniflux.NewClient(testBaseURL, testAdminUsername, testAdminPassword)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue