...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package errors
16
17 import (
18 "testing"
19
20 "github.com/stretchr/testify/assert"
21 )
22
23 func TestAPIVerificationFailed(t *testing.T) {
24 err := &APIVerificationFailed{
25 Section: "consumer",
26 MissingSpecification: []string{"application/json", "application/x-yaml"},
27 MissingRegistration: []string{"text/html", "application/xml"},
28 }
29
30 expected := `missing [text/html, application/xml] consumer registrations
31 missing from spec file [application/json, application/x-yaml] consumer`
32 assert.Equal(t, expected, err.Error())
33 }
34
View as plain text