hash password in test

This commit is contained in:
Hector 2023-06-21 11:27:01 +01:00
parent 82e67d8254
commit 605cafa635

View File

@ -9,7 +9,7 @@ import (
func Test_GIVEN_BasicAuthSet_WHEN_CallingIsAllowedWithCorrectCreds_THEN_TrueReturned(t *testing.T) { func Test_GIVEN_BasicAuthSet_WHEN_CallingIsAllowedWithCorrectCreds_THEN_TrueReturned(t *testing.T) {
// assemble // assemble
username := "u1" username := "u1"
password := "p1" password := HashString("abc")
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil) request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
request.SetBasicAuth(username, password) request.SetBasicAuth(username, password)
provider := NewBasicAuthProvider(username, password) provider := NewBasicAuthProvider(username, password)