Files
Bose-SoundTouch/tests/integration/http-client/delete_group.http
T
Tobias GesellchenandClaude Opus 4.8 41fccd6f1c test(http-client): cover the group delete lifecycle (refs #451)
create_group.http now captures the new group id from the Location header into
{{groupId}}; delete_group.http then completes the lifecycle by removing that
group (DELETE /group/{groupId} -> 200 with <status>) and exercises the no-id,
account-level teardown form a speaker sends on factory reset
(DELETE /group/ -> 200). Inserted after get_group.http, before device teardown.

make test-http-client: 59 requests, 0 failed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 19:11:24 +02:00

41 lines
1.8 KiB
HTTP

### DELETE /streaming/account/{accountId}/group/{groupId} (remove a specific group)
###
### Completes the group lifecycle: create_group.http created the group and
### captured its id into {{groupId}}; this removes that group
### (HandleMargeDeleteGroup -> 200 with a <status> body). Runs after get_group.http
### and before the device teardown so the group exists when we delete it.
DELETE {{host}}/streaming/account/{{accountId}}/group/{{groupId}}
Content-Type: application/vnd.bose.streaming-v1.2+xml
Authorization: Bearer {{token}}
User-Agent: Bose_Lisa/27.0.6
Accept: application/vnd.bose.streaming-v1.2+xml
> {%
client.test("Group deleted (200)", function () {
client.assert(response.status === 200, "Response status is not 200, got " + response.status);
client.assert(response.contentType.mimeType === "application/vnd.bose.streaming-v1.2+xml",
"Expected application/vnd.bose.streaming-v1.2+xml, got '" + response.contentType.mimeType + "'");
});
client.test("Response body confirms deletion", function () {
client.assert(response.body.getElementsByTagName("status").length > 0,
"Response should contain a <status> element");
});
%}
### DELETE /streaming/account/{accountId}/group/ (account-level teardown, no id)
###
### The no-id, trailing-slash form a speaker sends to clear all of an account's
### groups (e.g. during a factory reset). HandleMargeDeleteAccountGroups -> 200.
DELETE {{host}}/streaming/account/{{accountId}}/group/
Content-Type: application/vnd.bose.streaming-v1.2+xml
Authorization: Bearer {{token}}
User-Agent: Bose_Lisa/27.0.6
Accept: application/vnd.bose.streaming-v1.2+xml
> {%
client.test("Account-level group teardown (200)", function () {
client.assert(response.status === 200, "Response status is not 200, got " + response.status);
});
%}