encoding_test.go 275 B

12345678910111213141516
  1. package util
  2. import (
  3. "testing"
  4. . "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestEncoding(t *testing.T) {
  7. Convey("When generating base64 header", t, func() {
  8. result := GetBasicAuthHeader("grafana", "1234")
  9. So(result, ShouldEqual, "Z3JhZmFuYToxMjM0")
  10. })
  11. }