aboutsummaryrefslogtreecommitdiff
path: root/pkg/navitia_api_client/error_test.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/navitia_api_client/error_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/navitia_api_client/error_test.go b/pkg/navitia_api_client/error_test.go
index 5ecf8c2..67dfb9e 100644
--- a/pkg/navitia_api_client/error_test.go
+++ b/pkg/navitia_api_client/error_test.go
@@ -1,6 +1,15 @@
package navitia_api_client
-import "testing"
+import (
+ "reflect"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func requireErrorTypeMatch(t *testing.T, err error, expected error) {
+ require.Equalf(t, reflect.TypeOf(err), reflect.TypeOf(expected), "Invalid error type. Got %s but expected %s", reflect.TypeOf(err), reflect.TypeOf(expected))
+}
func TestErrorsCoverage(t *testing.T) {
apiErr := ApiError{}