forked from Silverfish/proton-bridge
Integration tests
This commit is contained in:
@ -70,9 +70,12 @@ func (ctl *Controller) PrintCalls() {
|
||||
|
||||
func (ctl *Controller) WasCalled(method, path string, expectedRequest []byte) bool {
|
||||
for _, call := range ctl.calls {
|
||||
if string(call.method) != method && call.path != path {
|
||||
if string(call.method) != method || call.path != path {
|
||||
continue
|
||||
}
|
||||
if string(expectedRequest) == "" {
|
||||
return true
|
||||
}
|
||||
diff, _ := jsondiff.Compare(call.request, expectedRequest, &jsondiff.Options{})
|
||||
isSuperset := diff == jsondiff.FullMatch || diff == jsondiff.SupersetMatch
|
||||
if isSuperset {
|
||||
|
||||
Reference in New Issue
Block a user