Add tests for unauthenticated POST feed requests

This commit is contained in:
Bnyro 2023-01-30 16:05:31 +01:00
parent 448659ea8a
commit 3e973854fb
1 changed files with 6 additions and 1 deletions

View File

@ -138,8 +138,13 @@ curl ${CURLOPTS[@]} $HOST/import/playlist -X POST -H "Content-Type: application/
# Delete User Test
curl ${CURLOPTS[@]} $HOST/user/delete -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d $(jq -n --compact-output --arg password "$PASS" '{"password": $password}') || exit 1
# Unauthenticated subscription tests
# Unauthenticated subscription tests GET
CHANNEL_IDS=UCsXVk37bltHxD1rDPwtNM8Q,UCXuqSBlHAE6Xw-yeJA0Tunw
curl ${CURLOPTS[@]} $HOST/feed/unauthenticated -G --data-urlencode "channels=$CHANNEL_IDS" || exit 1
curl ${CURLOPTS[@]} $HOST/feed/unauthenticated/rss -G --data-urlencode "channels=$CHANNEL_IDS" || exit 1
curl ${CURLOPTS[@]} $HOST/subscriptions/unauthenticated -G --data-urlencode "channels=$CHANNEL_IDS" || exit 1
# Unauthenticated subscription tests POST
CHANNEL_IDS='[UCsXVk37bltHxD1rDPwtNM8Q,UCXuqSBlHAE6Xw-yeJA0Tunw]'
curl ${CURLOPTS[@]} $HOST/feed/unauthenticated -X POST -d "$CHANNEL_IDS" || exit 1
curl ${CURLOPTS[@]} $HOST/subscriptions/unauthenticated -X POST -d "$CHANNEL_IDS" || exit 1