Convert response to json in test helper