Fix failing specs

This commit is contained in:
Eugene Burmakin 2025-09-20 14:25:16 +02:00
parent 339ba3130e
commit 1043d572fe
2 changed files with 10 additions and 10 deletions

View file

@ -11,11 +11,11 @@ RSpec.describe Maps::HexagonCenterManager do
context 'with pre-calculated hexagon centers' do
let(:pre_calculated_centers) do
{
'8a1fb46622dffff' => [5, 1_717_200_000, 1_717_203_600], # count, earliest, latest timestamps
'8a1fb46622e7fff' => [3, 1_717_210_000, 1_717_213_600],
'8a1fb46632dffff' => [8, 1_717_220_000, 1_717_223_600]
}
[
['8a1fb46622dffff', 5, 1_717_200_000, 1_717_203_600], # h3_index, count, earliest, latest timestamps
['8a1fb46622e7fff', 3, 1_717_210_000, 1_717_213_600],
['8a1fb46632dffff', 8, 1_717_220_000, 1_717_223_600]
]
end
let(:stat) { create(:stat, user:, year: 2024, month: 6, h3_hex_ids: pre_calculated_centers) }
@ -67,7 +67,7 @@ RSpec.describe Maps::HexagonCenterManager do
end
context 'with empty hexagon_centers' do
let(:stat) { create(:stat, user:, year: 2024, month: 6, h3_hex_ids: {}) }
let(:stat) { create(:stat, user:, year: 2024, month: 6, h3_hex_ids: []) }
it 'returns nil' do
expect(manage_centers).to be_nil

View file

@ -46,10 +46,10 @@ RSpec.describe Maps::HexagonRequestHandler do
context 'with public sharing UUID and pre-calculated centers' do
let(:pre_calculated_centers) do
{
'8a1fb46622dffff' => [5, 1_717_200_000, 1_717_203_600],
'8a1fb46622e7fff' => [3, 1_717_210_000, 1_717_213_600]
}
[
['8a1fb46622dffff', 5, 1_717_200_000, 1_717_203_600],
['8a1fb46622e7fff', 3, 1_717_210_000, 1_717_213_600]
]
end
let(:stat) do
create(:stat, :with_sharing_enabled, user:, year: 2024, month: 6,