MCPcopy Index your code
hub / github.com/git-bug/git-bug / expectUserQuery

Function expectUserQuery

bridge/github/import_integration_test.go:374–386  ·  view source on GitHub ↗
(t *testing.T, mock *mocks.Client)

Source from the content-addressed store, hash-verified

372}
373
374func expectUserQuery(t *testing.T, mock *mocks.Client) {
375 mock.On("Query", m.Anything, m.AnythingOfType("*github.userQuery"), m.AnythingOfType("map[string]interface {}")).Return(nil).Run(
376 func(args m.Arguments) {
377 vars := args.Get(2).(map[string]interface{})
378 ghost := githubv4.String("ghost")
379 require.Equal(t, ghost, vars["login"])
380
381 retVal := args.Get(1).(*userQuery)
382 retVal.User.Name = &ghost
383 retVal.User.Login = "ghost-login"
384 },
385 ).Once()
386}

Callers 1

setupExpectationsFunction · 0.85

Calls 3

RunMethod · 0.80
GetMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected