Commit d4e8e22f by bergquist

test: adds tests for password encodiing

parent 5b38c230
......@@ -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")
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment