From e2e2c88a772d05806592f6d61617070e0c7b001d Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Wed, 2 Oct 2024 22:05:12 +0200 Subject: [PATCH] Update changelog and visits/suggest spec --- CHANGELOG.md | 6 ++++-- spec/services/visits/suggest_spec.rb | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5f7092..d8e74864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Now you can use http protocol for the Photon API host if you don't have SSL certificate for it - For stats, total distance per month might have been not equal to the sum of distances per day. Now it's fixed and values are equal -### Added -- `GET /api/v1/points` can now accept optional `?order=asc` query parameter to return points in ascending order by timestamp. `?order=desc` is still available to return points in descending order by timestamp. +### Changed + +- `GET /api/v1/points` can now accept optional `?order=asc` query parameter to return points in ascending order by timestamp. `?order=desc` is still available to return points in descending order by timestamp +- `GET /api/v1/points` now returns `id` attribute for each point # [0.14.6] - 2024-29-30 diff --git a/spec/services/visits/suggest_spec.rb b/spec/services/visits/suggest_spec.rb index 2fd8b30f..c4bf3d30 100644 --- a/spec/services/visits/suggest_spec.rb +++ b/spec/services/visits/suggest_spec.rb @@ -42,12 +42,6 @@ RSpec.describe Visits::Suggest do expect { subject }.to change(Notification, :count).by(1) end - it 'reverse geocodes visits' do - expect_any_instance_of(Visit).to receive(:async_reverse_geocode).and_call_original - - subject - end - context 'when reverse geocoding is enabled' do before do stub_const('REVERSE_GEOCODING_ENABLED', true) @@ -60,5 +54,17 @@ RSpec.describe Visits::Suggest do subject end end + + context 'when reverse geocoding is disabled' do + before do + stub_const('REVERSE_GEOCODING_ENABLED', false) + end + + it 'does not reverse geocode visits' do + expect_any_instance_of(Visit).not_to receive(:async_reverse_geocode) + + subject + end + end end end