Fix tests.

This commit is contained in:
Mariano Cano 2019-12-18 14:44:08 -08:00
parent a6deea7d8d
commit eeabf5ba4c
3 changed files with 16 additions and 12 deletions

View file

@ -9,6 +9,7 @@ import (
"testing"
"github.com/pkg/errors"
"github.com/smallstep/certificates/errs"
"github.com/smallstep/certificates/logging"
)
@ -108,7 +109,7 @@ func TestReadJSON(t *testing.T) {
t.Errorf("ReadJSON() error = %v, wantErr %v", err, tt.wantErr)
}
if tt.wantErr {
e, ok := err.(*Error)
e, ok := err.(*errs.Error)
if ok {
if code := e.StatusCode(); code != 400 {
t.Errorf("error.StatusCode() = %v, wants 400", code)