libgit2/managed/http: test for incomplete creds
Add test for createClientRequest() where the credentials are incomplete. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
bc28ad5d1b
commit
7325430bc9
|
@ -105,6 +105,16 @@ func TestHttpAction_CreateClientRequest(t *testing.T) {
|
|||
},
|
||||
wantedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "incomplete credentials, no basic auth",
|
||||
action: git2go.SmartServiceActionReceivepackLs,
|
||||
transport: &http.Transport{},
|
||||
authOpts: git.AuthOptions{Username: "user"},
|
||||
assertFunc: func(g *WithT, req *http.Request, client *http.Client) {
|
||||
_, _, ok := req.BasicAuth()
|
||||
g.Expect(ok).To(BeFalse())
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "credentials are correctly configured",
|
||||
action: git2go.SmartServiceActionUploadpack,
|
||||
|
|
Loading…
Reference in New Issue