replace deprecated HeaderMap with Header() (#1585)

This commit is contained in:
andriikushch
2018-10-12 01:31:31 +02:00
committed by 田欧
parent fbdcbd2275
commit 6ab50f944c
5 changed files with 44 additions and 44 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ func TestBasicAuth401(t *testing.T) {
assert.False(t, called)
assert.Equal(t, http.StatusUnauthorized, w.Code)
assert.Equal(t, "Basic realm=\"Authorization Required\"", w.HeaderMap.Get("WWW-Authenticate"))
assert.Equal(t, "Basic realm=\"Authorization Required\"", w.Header().Get("WWW-Authenticate"))
}
func TestBasicAuth401WithCustomRealm(t *testing.T) {
@@ -142,5 +142,5 @@ func TestBasicAuth401WithCustomRealm(t *testing.T) {
assert.False(t, called)
assert.Equal(t, http.StatusUnauthorized, w.Code)
assert.Equal(t, "Basic realm=\"My Custom \\\"Realm\\\"\"", w.HeaderMap.Get("WWW-Authenticate"))
assert.Equal(t, "Basic realm=\"My Custom \\\"Realm\\\"\"", w.Header().Get("WWW-Authenticate"))
}