mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Ensure that the service does not create duplicate visits
This commit is contained in:
parent
403366c321
commit
3d63b29651
1 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,14 @@ RSpec.describe Areas::Visits::Create do
|
|||
expect(work_visit.points).to match_array([work_point1, work_point2, work_point3])
|
||||
end
|
||||
end
|
||||
|
||||
context 'running twice' do
|
||||
it 'does not create duplicate visits' do
|
||||
create_visits
|
||||
|
||||
expect { create_visits }.not_to(change { Visit.count })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue