Skip to content

Commit

Permalink
feat: add opml import test
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfgang <[email protected]>
  • Loading branch information
wofferl committed Feb 14, 2025
1 parent 1e5d766 commit 70c90f9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/command/opml.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ teardown() {
done
}

@test "[$TESTSUITE] Import" {
run ./occ news:opml:import "$user" apps/news/tests/test_helper/feeds/Nextcloud.opml
assert_success

run ./occ news:feed:list "$user"
assert_success

if ! echo "$output" | grep "title.*Nextcloud"; then
assert_output --partial "Feed not imported"
fi
}

@test "[$TESTSUITE] Export" {
run ./occ news:feed:add "$user" "$NC_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}"
assert_success
Expand Down
9 changes: 9 additions & 0 deletions tests/test_helper/feeds/Nextcloud.opml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<opml version="2.0">
<head>
<title>Subscriptions</title>
</head>
<body>
<outline title="Nextcloud" text="Nextcloud" type="rss" xmlUrl="http://localhost:8090/Nextcloud.rss" htmlUrl="https://nextcloud.com/"/>
</body>
</opml>

0 comments on commit 70c90f9

Please sign in to comment.