Commit 78c5e867f411090e34e81b8f0c23e44e42c5edb4

Authored by Braulio Bhavamitra
1 parent 90ceace5

html_safe: workaround rails bug and URI.encode

See http://stackoverflow.com/a/9470948/670229 and https://github.com/rails/rails/issues/1555
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
test/api/people_test.rb
... ... @@ -68,7 +68,7 @@ class PeopleTest < ActiveSupport::TestCase
68 68 end
69 69  
70 70 should 'people endpoint filter by fields parameter with hierarchy' do
71   - fields = URI.encode({only: [:name, {user: [:login]}]}.to_json)
  71 + fields = URI.encode({only: [:name, {user: [:login]}]}.to_json.to_str)
72 72 get "/api/v1/people?#{params.to_query}&fields=#{fields}"
73 73 json = JSON.parse(last_response.body)
74 74 expected = {'people' => [{'name' => person.name, 'user' => {'login' => 'testapi'}}]}
... ...