File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -253,15 +253,24 @@ func TestImportPayloads_CanImportASingleBase64EncodedPayload(t *testing.T) {
253
253
Query : "" , Body : "" ,
254
254
Headers : map [string ][]string {"Hoverfly" : []string {"testing" }}}}
255
255
256
- originalPayload := encodedPayload
257
- originalPayload .Response .Body = "hello_world"
258
-
259
256
hv .ImportPayloads ([]models.PayloadView {encodedPayload })
260
257
261
258
value , err := cache .Get ([]byte ("9b114df98da7f7e2afdc975883dab4f2" ))
262
259
Expect (err ).To (BeNil ())
260
+
263
261
decodedPayload , err := models .NewPayloadFromBytes (value )
264
262
Expect (err ).To (BeNil ())
265
- Expect (* decodedPayload ).ToNot (Equal (encodedPayload ))
266
- Expect (* decodedPayload ).To (Equal (originalPayload .ConvertToPayload ()))
263
+
264
+ Expect (decodedPayload ).ToNot (Equal (models.Payload {
265
+ Response : models.ResponseDetails {
266
+ Status : 200 ,
267
+ Body : "hello_world" ,
268
+ Headers : map [string ][]string {"Content-Encoding" : []string {"gzip" }}},
269
+ Request : models.RequestDetails {
270
+ Path : "/" ,
271
+ Method : "GET" ,
272
+ Destination : "/" ,
273
+ Scheme : "scheme" ,
274
+ Query : "" , Body : "" ,
275
+ Headers : map [string ][]string {"Hoverfly" : []string {"testing" }}}}))
267
276
}
You can’t perform that action at this time.
0 commit comments