mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 23:12:17 +08:00
Revert "remove dummy code"
This reverts commit 4cb39237cf5e2f1fd01457d4e6da62436f06a35c.
This commit is contained in:
parent
4cb39237cf
commit
5e0e111106
13
auth_test.go
13
auth_test.go
@ -20,11 +20,24 @@ func TestBasicAuth(t *testing.T) {
|
|||||||
"bar": "foo",
|
"bar": "foo",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
assert.Len(t, authMap, 3)
|
assert.Len(t, authMap, 3)
|
||||||
assert.Contains(t,authMap,"Basic YmFyOmZvbw==")
|
assert.Contains(t,authMap,"Basic YmFyOmZvbw==")
|
||||||
assert.Contains(t,authMap,"Basic Zm9vOmJhcg==")
|
assert.Contains(t,authMap,"Basic Zm9vOmJhcg==")
|
||||||
assert.Contains(t,authMap,"Basic YWRtaW46cGFzc3dvcmQ=")
|
assert.Contains(t,authMap,"Basic YWRtaW46cGFzc3dvcmQ=")
|
||||||
|
|
||||||
|
//assert.Contains(t, pairs, authPair{
|
||||||
|
// user: "bar",
|
||||||
|
// value: "Basic YmFyOmZvbw==",
|
||||||
|
//})
|
||||||
|
//assert.Contains(t, pairs, authPair{
|
||||||
|
// user: "foo",
|
||||||
|
// value: "Basic Zm9vOmJhcg==",
|
||||||
|
//})
|
||||||
|
//assert.Contains(t, pairs, authPair{
|
||||||
|
// user: "admin",
|
||||||
|
// value: "Basic YWRtaW46cGFzc3dvcmQ=",
|
||||||
|
//})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBasicAuthFails(t *testing.T) {
|
func TestBasicAuthFails(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user