From d4e8e22fda7b35cfd86230feddaebabb0bebee0a Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 9 Nov 2017 17:55:12 +0100 Subject: [PATCH] test: adds tests for password encodiing --- pkg/util/encoding_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/util/encoding_test.go b/pkg/util/encoding_test.go index abcf5425826..6b0e9331467 100644 --- a/pkg/util/encoding_test.go +++ b/pkg/util/encoding_test.go @@ -7,7 +7,6 @@ import ( ) func TestEncoding(t *testing.T) { - Convey("When generating base64 header", t, func() { result := GetBasicAuthHeader("grafana", "1234") @@ -23,4 +22,8 @@ func TestEncoding(t *testing.T) { So(password, ShouldEqual, "1234") }) + Convey("When encoding password", t, func() { + encodedPassword := EncodePassword("iamgod", "pepper") + So(encodedPassword, ShouldEqual, "e59c568621e57756495a468f47c74e07c911b037084dd464bb2ed72410970dc849cabd71b48c394faf08a5405dae53741ce9") + }) }