File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 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) {
253253 Query : "" , Body : "" ,
254254 Headers : map [string ][]string {"Hoverfly" : []string {"testing" }}}}
255255
256- originalPayload := encodedPayload
257- originalPayload .Response .Body = "hello_world"
258-
259256 hv .ImportPayloads ([]models.PayloadView {encodedPayload })
260257
261258 value , err := cache .Get ([]byte ("9b114df98da7f7e2afdc975883dab4f2" ))
262259 Expect (err ).To (BeNil ())
260+
263261 decodedPayload , err := models .NewPayloadFromBytes (value )
264262 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" }}}}))
267276}
You can’t perform that action at this time.
0 commit comments