mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 10:16:15 -06:00
print json rep of activity
This commit is contained in:
parent
501c383c02
commit
e3005dc341
1 changed files with 11 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ package federation_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -92,6 +94,15 @@ func (suite *ProtocolTestSuite) TestPostInboxRequestBodyHook() {
|
||||||
assert.True(suite.T(), ok)
|
assert.True(suite.T(), ok)
|
||||||
assert.NotNil(suite.T(), returnedActivity)
|
assert.NotNil(suite.T(), returnedActivity)
|
||||||
assert.EqualValues(suite.T(), activity, returnedActivity)
|
assert.EqualValues(suite.T(), activity, returnedActivity)
|
||||||
|
|
||||||
|
r, err := returnedActivity.Serialize()
|
||||||
|
assert.NoError(suite.T(), err)
|
||||||
|
|
||||||
|
b, err := json.Marshal(r)
|
||||||
|
assert.NoError(suite.T(), err)
|
||||||
|
|
||||||
|
fmt.Println(string(b))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestProtocolTestSuite(t *testing.T) {
|
func TestProtocolTestSuite(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue