Skip to content

Commit

Permalink
add subtests for new endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Jul 8, 2024
1 parent 1089070 commit 0c5fb7d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/media_thumbnail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func TestLocalPngThumbnail(t *testing.T) {
uri := alice.UploadContent(t, data.LargePng, fileName, contentType)

fetchAndValidateThumbnail(t, alice, uri, false)
// test the new /_matrix/client/v1/media endpoint
fetchAndValidateThumbnail(t, alice, uri, true)
t.Run("test /_matrix/client/v1/media endpoint", func(t *testing.T) {
fetchAndValidateThumbnail(t, alice, uri, true)
})

}

Expand All @@ -50,8 +51,10 @@ func TestRemotePngThumbnail(t *testing.T) {
uri := alice.UploadContent(t, data.LargePng, fileName, contentType)

fetchAndValidateThumbnail(t, bob, uri, false)
// test the new /_matrix/client/v1/media endpoint
fetchAndValidateThumbnail(t, bob, uri, true)

t.Run("test /_matrix/client/v1/media endpoint", func(t *testing.T) {
fetchAndValidateThumbnail(t, bob, uri, true)
})

// Remove the AccessToken and try again, this should now return a 401.
alice.AccessToken = ""
Expand Down

0 comments on commit 0c5fb7d

Please sign in to comment.