Skip to content
Snippets Groups Projects
Verified Commit ed2393e9 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

test: add test to update & clear the default playlist id

parent f9c9b425
No related branches found
No related tags found
1 merge request!59Add playlists
Pipeline #8694 passed
...@@ -176,3 +176,26 @@ def test_update_show_forbidden_for_common_user( ...@@ -176,3 +176,26 @@ def test_update_show_forbidden_for_common_user(
response = common_api_client1.patch(url(show), data=update, format="json") response = common_api_client1.patch(url(show), data=update, format="json")
assert response.status_code == 403 assert response.status_code == 403
def test_update_default_playlist_id(admin_api_client, show, default_playlist):
update = {"default_playlist_id": default_playlist.id}
response = admin_api_client.patch(url(show=show), data=update)
assert response.status_code == 200
assert response.data["default_playlist_id"] == update["default_playlist_id"]
def test_clear_default_playlist_id(admin_api_client, show, default_playlist):
show.default_playlist = default_playlist
show.save()
update = {"default_playlist_id": None}
response = admin_api_client.patch(url(show=show), data=update, format="json")
assert response.status_code == 200
assert response.data["default_playlist_id"] == update["default_playlist_id"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment