mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
18 lines
445 B
Ruby
18 lines
445 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe OwnTracks::ExportParser do
|
|
describe '#call' do
|
|
subject(:parser) { described_class.new(import, user.id).call }
|
|
|
|
let(:user) { create(:user) }
|
|
let(:import) { create(:import, user:, name: 'owntracks_export.json') }
|
|
|
|
context 'when file exists' do
|
|
it 'creates points' do
|
|
expect { parser }.to change { Point.count }.by(8)
|
|
end
|
|
end
|
|
end
|
|
end
|