Commit 78c5e867f411090e34e81b8f0c23e44e42c5edb4
1 parent
90ceace5
Exists in
send_email_to_admins
and in
5 other branches
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,7 +68,7 @@ class PeopleTest < ActiveSupport::TestCase | ||
68 | end | 68 | end |
69 | 69 | ||
70 | should 'people endpoint filter by fields parameter with hierarchy' do | 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 | get "/api/v1/people?#{params.to_query}&fields=#{fields}" | 72 | get "/api/v1/people?#{params.to_query}&fields=#{fields}" |
73 | json = JSON.parse(last_response.body) | 73 | json = JSON.parse(last_response.body) |
74 | expected = {'people' => [{'name' => person.name, 'user' => {'login' => 'testapi'}}]} | 74 | expected = {'people' => [{'name' => person.name, 'user' => {'login' => 'testapi'}}]} |