mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Fix countries spec
This commit is contained in:
parent
a48cff098b
commit
108239f41c
1 changed files with 3 additions and 6 deletions
|
|
@ -52,9 +52,7 @@ RSpec.describe Trips::Countries do
|
||||||
|
|
||||||
result = described_class.new(trip).call
|
result = described_class.new(trip).call
|
||||||
|
|
||||||
expect(result).to be_a(Hash)
|
expect(result).to match_array(%w[DE SE FI])
|
||||||
expect(result.keys).to match_array(%w[DE SE FI])
|
|
||||||
expect(result.values.sum).to eq(3)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'handles points without coordinates' do
|
it 'handles points without coordinates' do
|
||||||
|
|
@ -62,7 +60,7 @@ RSpec.describe Trips::Countries do
|
||||||
|
|
||||||
result = described_class.new(trip).call
|
result = described_class.new(trip).call
|
||||||
|
|
||||||
expect(result.values.sum).to eq(3) # Should only count the 3 valid points
|
expect(result.size).to eq(3) # Should only count the 3 valid points
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'processes batches in multiple threads' do
|
it 'processes batches in multiple threads' do
|
||||||
|
|
@ -77,8 +75,7 @@ RSpec.describe Trips::Countries do
|
||||||
|
|
||||||
result = described_class.new(trip).call
|
result = described_class.new(trip).call
|
||||||
|
|
||||||
expect(result.keys.first).to eq('DE')
|
expect(result.first).to eq('DE')
|
||||||
expect(result['DE']).to eq(2)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when an error occurs' do
|
context 'when an error occurs' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue