From 78c5e867f411090e34e81b8f0c23e44e42c5edb4 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Mon, 25 Apr 2016 17:25:01 -0300 Subject: [PATCH] html_safe: workaround rails bug and URI.encode --- test/api/people_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/people_test.rb b/test/api/people_test.rb index a9f3951..038313e 100644 --- a/test/api/people_test.rb +++ b/test/api/people_test.rb @@ -68,7 +68,7 @@ class PeopleTest < ActiveSupport::TestCase end should 'people endpoint filter by fields parameter with hierarchy' do - fields = URI.encode({only: [:name, {user: [:login]}]}.to_json) + fields = URI.encode({only: [:name, {user: [:login]}]}.to_json.to_str) get "/api/v1/people?#{params.to_query}&fields=#{fields}" json = JSON.parse(last_response.body) expected = {'people' => [{'name' => person.name, 'user' => {'login' => 'testapi'}}]} -- libgit2 0.21.2