MCPcopy Index your code
hub / github.com/GetStream/stream-cli / TestQueryUser

Function TestQueryUser

pkg/cmd/chat/user/user_test.go:72–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestQueryUser(t *testing.T) {
73 u := test.CreateUser()
74 t.Cleanup(func() {
75 test.DeleteUser(u)
76 })
77 cmd := test.GetRootCmdWithSubCommands(NewCmds()...)
78 cmd.SetArgs([]string{"query-users", "-f", "{\"id\": \"" + u + "\"}"})
79 _, err := cmd.ExecuteC()
80 require.NoError(t, err)
81 require.Contains(t, cmd.OutOrStdout().(*bytes.Buffer).String(), u)
82}
83
84func TestRevokeToken(t *testing.T) {
85 u := test.CreateUser()

Callers

nothing calls this directly

Calls 5

CreateUserFunction · 0.92
DeleteUserFunction · 0.92
StringMethod · 0.80
NewCmdsFunction · 0.70

Tested by

no test coverage detected