From 1e17e67c143386840b303a5382db193b6df81525 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Wed, 16 Mar 2022 20:25:49 +0100 Subject: test delete one feed Signed-off-by: Benjamin Brahmer --- tests/api/feeds.bats | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3