This commit is contained in:
Tan Jiang 2018-03-01 18:52:09 +08:00
parent 3a5bff1615
commit 2f2bc7f3ef

View File

@ -17,6 +17,7 @@ import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common"
"github.com/vmware/harbor/src/common/models"
)
@ -80,3 +81,10 @@ func TestDefaultOnBoardUser(t *testing.T) {
t.Fatal("Default implementation should return nil")
}
}
func TestErrAuth(t *testing.T) {
assert := assert.New(t)
e := NewErrAuth("test")
expectedStr := "Failed to authenticate user, due to error 'test'"
assert.Equal(expectedStr, e.Error())
}