mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Add/improve e2e test cases
This commit is contained in:
@@ -229,10 +229,6 @@ type RecentItemParity struct {
|
||||
Source *RecentItemParitySource `xml:"source,omitempty"`
|
||||
SourceID string `xml:"sourceid"`
|
||||
UpdatedOn string `xml:"updatedOn"`
|
||||
Username string `xml:"username"`
|
||||
ContainerArt string `xml:"containerArt"`
|
||||
SourceAccount string `xml:"sourceAccount"`
|
||||
IsPresetable string `xml:"isPresetable"`
|
||||
}
|
||||
|
||||
// RecentItemParitySource represents the source in a RecentItemParity.
|
||||
@@ -240,7 +236,7 @@ type RecentItemParitySource struct {
|
||||
ID string `xml:"id,attr"`
|
||||
Type string `xml:"type,attr"`
|
||||
CreatedOn string `xml:"createdOn"`
|
||||
Credential *RecentItemParityCredential `xml:"credential,omitempty"`
|
||||
Credential *RecentItemParityCredential `xml:"credential"`
|
||||
Name string `xml:"name"`
|
||||
SourceProviderID string `xml:"sourceproviderid"`
|
||||
SourceName string `xml:"sourcename"`
|
||||
|
||||
@@ -120,6 +120,14 @@ func TestServiceRecent_Parity(t *testing.T) {
|
||||
CreatedOn: "2026-03-22T10:00:04.000+00:00",
|
||||
UpdatedOn: "2026-03-22T10:53:50.719+00:00",
|
||||
LastPlayedAt: "2026-03-22T10:53:48.000+00:00",
|
||||
Source: &RecentItemParitySource{
|
||||
ID: "10863533",
|
||||
Type: "Audio",
|
||||
Credential: &RecentItemParityCredential{
|
||||
Type: "token",
|
||||
Value: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
data, err := xml.MarshalIndent(recent, "", " ")
|
||||
@@ -137,6 +145,7 @@ func TestServiceRecent_Parity(t *testing.T) {
|
||||
`<name>Dopamine</name>`,
|
||||
`<sourceid>10863533</sourceid>`,
|
||||
`<updatedOn>2026-03-22T10:53:50.719+00:00</updatedOn>`,
|
||||
`<credential type="token"></credential>`,
|
||||
}
|
||||
|
||||
for _, expected := range expectedElements {
|
||||
|
||||
Reference in New Issue
Block a user