MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / testJSONResponse

Function testJSONResponse

backend/pkg/httpserver/server_test.go:1187–1196  ·  view source on GitHub ↗
(statusCode int, body string)

Source from the content-addressed store, hash-verified

1185 t *testing.T
1186 callCountPublishSearchConfigurationChanged int
1187 publishSearchConfigurationChangedCfg *MockPublishSearchConfigurationChangedConfig
1188}
1189
1190func (m *MockEventPublisher) PublishSearchConfigurationChanged(
1191 _ context.Context,
1192 resp *backend.SavedSearchResponse,
1193 userID string,
1194 isCreation bool) error {
1195 m.callCountPublishSearchConfigurationChanged++
1196 if !reflect.DeepEqual(resp, m.publishSearchConfigurationChangedCfg.expectedResp) {
1197 m.t.Errorf("unexpected response %+v", resp)
1198 }
1199 if userID != m.publishSearchConfigurationChangedCfg.expectedUserID {

Calls

no outgoing calls

Tested by

no test coverage detected