spec/import_spec.rb in cartodb-importer-0.2.2 vs spec/import_spec.rb in cartodb-importer-0.2.3
- old
+ new
@@ -247,6 +247,26 @@
result.name.should == 'global_elevation_simple_tif'
result.rows_imported.should == 1500
result.import_type.should == '.tif'
end
end
+ describe "Extended" do
+ it "should import 1 SHP file" do
+ importer = CartoDB::Importer.new :import_from_file => File.expand_path("../../../vm-cartodb/extended_tests/cua2005index_sp.zip", __FILE__),
+ :database => "cartodb_importer_test", :username => 'postgres', :password => '',
+ :host => 'localhost', :port => 5432
+ result = importer.import!
+ result.name.should == 'cua2005index_sp_shp'
+ result.rows_imported.should == 4365
+ result.import_type.should == '.shp'
+ end
+ it "should import 2 SHP file" do
+ importer = CartoDB::Importer.new :import_from_file => File.expand_path("../../../vm-cartodb/extended_tests/cua2005index_utm.zip", __FILE__),
+ :database => "cartodb_importer_test", :username => 'postgres', :password => '',
+ :host => 'localhost', :port => 5432
+ result = importer.import!
+ result.name.should == 'cua2005index_utm_shp'
+ result.rows_imported.should == 4528
+ result.import_type.should == '.shp'
+ end
+ end
end