From cbcb9f4d8c63915176d495783afe308557285c6a Mon Sep 17 00:00:00 2001 From: Edimo Date: Fri, 19 Jul 2024 19:44:40 -0300 Subject: [PATCH] 186-add location to fetch_schools --- backend/app/actors/fetch_schools.rb | 2 +- backend/spec/actors/fetch_schools_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/app/actors/fetch_schools.rb b/backend/app/actors/fetch_schools.rb index 57975aa..acbbd7a 100644 --- a/backend/app/actors/fetch_schools.rb +++ b/backend/app/actors/fetch_schools.rb @@ -24,7 +24,7 @@ def fetch_schools def params { api_key:, - fields: "id,school.name", + fields: "id,school.name,location", page: 0, "school.name" => school_name_like } diff --git a/backend/spec/actors/fetch_schools_spec.rb b/backend/spec/actors/fetch_schools_spec.rb index bb94cfc..c0c3d61 100644 --- a/backend/spec/actors/fetch_schools_spec.rb +++ b/backend/spec/actors/fetch_schools_spec.rb @@ -10,7 +10,7 @@ let(:valid_params) do { api_key:, - fields: "id,school.name", + fields: "id,school.name,location", page: 0, "school.name" => school_name } @@ -21,7 +21,9 @@ let(:schools) do [ { "id" => "1", - "school.name" => school_name } + "school.name" => school_name, + "location.lat" => 42.374471, + "location.lon" => -71.118313 } ] end