diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-03-16 20:25:49 +0100 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-05-03 21:27:48 +0200 |
commit | 1e17e67c143386840b303a5382db193b6df81525 (patch) | |
tree | 2fa3b312397059f4864191cd1829ca237a6c983d | |
parent | c4c2adde2c9d5744d0e83847f3be45c5a6031478 (diff) |
test delete one feed
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r-- | tests/api/feeds.bats | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/api/feeds.bats b/tests/api/feeds.bats index ab1b03bf2..9b175df81 100644 --- a/tests/api/feeds.bats +++ b/tests/api/feeds.bats @@ -23,8 +23,17 @@ teardown() { } @test "[$TESTSUITE] Create new" { + # $() is needed in this case otherwise bats fails to fetch the output... run $(http --ignore-stdin -b -a ${user}:${user} POST ${BASE_URLv1}/feeds url=$NC_FEED | jq '.feeds | .[0].url') # self reference of feed is used here assert_output --partial "https://nextcloud.com/blog/feed/" } + +@test "[$TESTSUITE] Delete one" { + ID=$(http --ignore-stdin -b -a ${user}:${user} POST ${BASE_URLv1}/feeds url=$NC_FEED | jq '.feeds | .[0].id') + + run http --ignore-stdin -b -a ${user}:${user} DELETE ${BASE_URLv1}/feeds/$ID + + assert_output --partial "[]" +}
\ No newline at end of file |