Skip to content

Conversation

@vmihailenco
Copy link

httpexpect.Request holds a copy of query in r.query, but fails to copy/sync the query set in the RequestFactory.

@vmihailenco
Copy link
Author

I also tried to write a test for TestExpect_RequestFactory, but it is not easy because encodeRequest is not called there and this code is never executed:

func (r *Request) encodeRequest(opChain *chain) bool {
	r.httpReq.URL.Path = concatPaths(r.httpReq.URL.Path, r.path)

	if r.query != nil {
		r.httpReq.URL.RawQuery = r.query.Encode()           <--- here the query is overriden
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant