I am testing a function to send a mock request to a server using gomega and I want to verify that 1. the request has started 2. the request has completed. For this I am returning two booleans. They should both evaluate to true in the example below but the values will be subject to change. I have tried this:
g := gomega.NewGomegaWithT(t)
...
g.Eventually(func() (bool, bool) {
...
start = false
end = true
if (request.status == "started") {
start = true
}
if (request.status == "complete") {
end = true
}
return start, end
}).Should(Equal((true, true))
But it seems that gomega's Equal()
does not handle multiple variables. Is there any way around this? Is it bad practice to evaluate two return values ?