MCPcopy
hub / github.com/gofiber/fiber / Test_Client_Invalid_URL

Function Test_Client_Invalid_URL

client/client_test.go:813–829  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

811}
812
813func Test_Client_Invalid_URL(t *testing.T) {
814 t.Parallel()
815
816 app, dial, start := createHelperServer(t)
817
818 app.Get("/", func(c fiber.Ctx) error {
819 return c.SendString(c.Hostname())
820 })
821
822 go start()
823
824 _, err := New().SetDial(dial).
825 R().
826 Get("http//example")
827
828 require.ErrorIs(t, err, ErrURLFormat)
829}
830
831func Test_Client_Unsupported_Protocol(t *testing.T) {
832 t.Parallel()

Callers

nothing calls this directly

Calls 7

createHelperServerFunction · 0.85
RMethod · 0.80
NewFunction · 0.70
GetMethod · 0.65
SendStringMethod · 0.65
HostnameMethod · 0.65
SetDialMethod · 0.65

Tested by

no test coverage detected