mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 01:12:27 -06:00
linting, fmt
This commit is contained in:
parent
2ed1e36ee0
commit
dda2c9ab1c
4 changed files with 11 additions and 11 deletions
|
|
@ -998,6 +998,7 @@ func NewTestFaves() map[string]*gtsmodel.StatusFave {
|
|||
}
|
||||
}
|
||||
|
||||
// NewTestActivities returns a bunch of pub.Activity types for use in testing the federation protocols.
|
||||
func NewTestActivities() map[string]pub.Activity {
|
||||
dmForZork := newNote(
|
||||
URLMustParse("https://fossbros-anonymous.io/users/foss_satan/statuses/5424b153-4553-4f30-9358-7b92f7cd42f6"),
|
||||
|
|
|
|||
|
|
@ -43,15 +43,15 @@ func NewTestTransportController(db db.DB, client pub.HttpClient) transport.Contr
|
|||
// NewMockHTTPClient returns a client that conforms to the pub.HttpClient interface,
|
||||
// but will always just execute the given `do` function, allowing responses to be mocked.
|
||||
func NewMockHTTPClient(do func(req *http.Request) (*http.Response, error)) pub.HttpClient {
|
||||
return &mockHttpClient{
|
||||
return &mockHTTPClient{
|
||||
do: do,
|
||||
}
|
||||
}
|
||||
|
||||
type mockHttpClient struct {
|
||||
type mockHTTPClient struct {
|
||||
do func(req *http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
func (m *mockHttpClient) Do(req *http.Request) (*http.Response, error) {
|
||||
func (m *mockHTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
return m.do(req)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue