summaryrefslogtreecommitdiff
path: root/internal/api/client
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-10 19:29:26 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-10 19:29:26 +0100
commitba9d6b467a1f03447789844048d913738c843569 (patch)
tree5a464ee4a33f26e3284179582ab6d3332d9d5388 /internal/api/client
parent[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from s... (diff)
downloadgotosocial-ba9d6b467a1f03447789844048d913738c843569.tar.xz
[feature] Media attachment placeholders (#2331)
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
Diffstat (limited to 'internal/api/client')
-rw-r--r--internal/api/client/followrequests/get_test.go4
-rw-r--r--internal/api/client/media/mediacreate_test.go8
-rw-r--r--internal/api/client/media/mediaupdate_test.go4
3 files changed, 8 insertions, 8 deletions
diff --git a/internal/api/client/followrequests/get_test.go b/internal/api/client/followrequests/get_test.go
index f2fa832a1..24f3c9646 100644
--- a/internal/api/client/followrequests/get_test.go
+++ b/internal/api/client/followrequests/get_test.go
@@ -99,8 +99,8 @@ func (suite *GetTestSuite) TestGet() {
"header_static": "http://localhost:8080/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
- "statuses_count": 0,
- "last_status_at": null,
+ "statuses_count": 1,
+ "last_status_at": "2023-11-02T10:44:25.000Z",
"emojis": [],
"fields": []
}
diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go
index 3f0b9dc0d..928d70379 100644
--- a/internal/api/client/media/mediacreate_test.go
+++ b/internal/api/client/media/mediacreate_test.go
@@ -216,8 +216,8 @@ func (suite *MediaCreateTestSuite) TestMediaCreateSuccessful() {
X: -0.5,
Y: 0.5,
},
- }, attachmentReply.Meta)
- suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", attachmentReply.Blurhash)
+ }, *attachmentReply.Meta)
+ suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", *attachmentReply.Blurhash)
suite.NotEmpty(attachmentReply.ID)
suite.NotEmpty(attachmentReply.URL)
suite.NotEmpty(attachmentReply.PreviewURL)
@@ -301,8 +301,8 @@ func (suite *MediaCreateTestSuite) TestMediaCreateSuccessfulV2() {
X: -0.5,
Y: 0.5,
},
- }, attachmentReply.Meta)
- suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", attachmentReply.Blurhash)
+ }, *attachmentReply.Meta)
+ suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", *attachmentReply.Blurhash)
suite.NotEmpty(attachmentReply.ID)
suite.Nil(attachmentReply.URL)
suite.NotEmpty(attachmentReply.PreviewURL)
diff --git a/internal/api/client/media/mediaupdate_test.go b/internal/api/client/media/mediaupdate_test.go
index 603bde402..a0ff1b96d 100644
--- a/internal/api/client/media/mediaupdate_test.go
+++ b/internal/api/client/media/mediaupdate_test.go
@@ -186,8 +186,8 @@ func (suite *MediaUpdateTestSuite) TestUpdateImage() {
Original: apimodel.MediaDimensions{Width: 800, Height: 450, FrameRate: "", Duration: 0, Bitrate: 0, Size: "800x450", Aspect: 1.7777778},
Small: apimodel.MediaDimensions{Width: 256, Height: 144, FrameRate: "", Duration: 0, Bitrate: 0, Size: "256x144", Aspect: 1.7777778},
Focus: &apimodel.MediaFocus{X: -0.1, Y: 0.3},
- }, attachmentReply.Meta)
- suite.Equal(toUpdate.Blurhash, attachmentReply.Blurhash)
+ }, *attachmentReply.Meta)
+ suite.Equal(toUpdate.Blurhash, *attachmentReply.Blurhash)
suite.Equal(toUpdate.ID, attachmentReply.ID)
suite.Equal(toUpdate.URL, *attachmentReply.URL)
suite.NotEmpty(toUpdate.Thumbnail.URL, attachmentReply.PreviewURL)