diff options
Diffstat (limited to 'integration_test.go')
-rw-r--r-- | integration_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/integration_test.go b/integration_test.go index 0a53bef..fb0a785 100644 --- a/integration_test.go +++ b/integration_test.go @@ -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) |