Commit 7bfa36cea9029056e049c5bfebf3f9918e193398
1 parent
c77d5d29
Exists in
web_steps_improvements
and in
8 other branches
Encode json on URI to test api field filter
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> Signed-off-by: Joenio Costa <joenio@colivre.coop.br>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
test/unit/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 = {only: [:name, {user: [:login]}]}.to_json | |
71 | + fields = URI.encode({only: [:name, {user: [:login]}]}.to_json) | |
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'}}]} | ... | ... |