|
|
|
@ -347,6 +347,19 @@ describe DataImport do
|
|
|
|
|
table.should_not be_nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'imports a gpkg with no coordinate system' do
|
|
|
|
|
data_import = DataImport.create(
|
|
|
|
|
user_id: @user.id,
|
|
|
|
|
data_source: fake_data_path('no_coordinate_system_dataset.gpkg'),
|
|
|
|
|
updated_at: Time.now
|
|
|
|
|
).run_import!
|
|
|
|
|
|
|
|
|
|
table = ::UserTable.where(id: data_import.table_id).first
|
|
|
|
|
table.should_not be_nil
|
|
|
|
|
table.name.should be == 'no_coordinate_system_dataset'
|
|
|
|
|
table.service.records[:rows].should have(1).items
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'should allow to create a table from a url' do
|
|
|
|
|
data_import = nil
|
|
|
|
|
CartoDB::Importer2::Downloader.any_instance.stubs(:validate_url!).returns(true)
|
|
|
|
|