diff options
Diffstat (limited to 'modules/base/tool_test.go')
-rw-r--r-- | modules/base/tool_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go index 0c5bd66579..0b708dafdb 100644 --- a/modules/base/tool_test.go +++ b/modules/base/tool_test.go @@ -43,6 +43,12 @@ func TestBasicAuthDecode(t *testing.T) { assert.NoError(t, err) assert.Equal(t, "foo", user) assert.Equal(t, "bar", pass) + + _, _, err = BasicAuthDecode("aW52YWxpZA==") + assert.Error(t, err) + + _, _, err = BasicAuthDecode("invalid") + assert.Error(t, err) } func TestBasicAuthEncode(t *testing.T) { |