mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
18 lines
490 B
Ruby
18 lines
490 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe Points::CreateJob, type: :job do
|
|
describe '#perform' do
|
|
subject(:perform) { described_class.new.perform(json, user.id) }
|
|
|
|
let(:file_path) { 'spec/fixtures/files/points/geojson_example.json' }
|
|
let(:file) { File.open(file_path) }
|
|
let(:json) { JSON.parse(file.read) }
|
|
let(:user) { create(:user) }
|
|
|
|
it 'creates a point' do
|
|
expect { perform }.to change { Point.count }.by(6)
|
|
end
|
|
end
|
|
end
|