Updating current table name after renaming

2.0
David Arango 12 years ago
parent 1f5be75ccb
commit 332bedbd0a

@ -64,6 +64,7 @@ module CartoDB
# Rename our table
if @current_name != @suggested_name
@db_connection.run("ALTER TABLE #{@current_name} RENAME TO #{@suggested_name}")
@current_name = @suggested_name
end
if column_names.include? "cartodb_id"

@ -55,6 +55,21 @@ describe "Imports API" do
import['state'].should be == 'complete'
end
it 'allows users to import files with weird filenames' do
post v1_imports_url(:host => 'test.localhost.lan'), :file_uri => upload_file('spec/support/data/_penguins_below_80 (2).tgz', 'text/plain'),
:table_name => '_penguins_below_80\ \(2\).tgz',
:api_key => @user.get_map_key
item_queue_id = JSON.parse(response.body)['item_queue_id']
get v1_import_url(:host => 'test.localhost.lan', :id => item_queue_id), :api_key => @user.get_map_key
response.code.should be == '200'
import = JSON.parse(response.body)
import['state'].should be == 'complete'
end
it 'allows users to get a list of pending imports'
it 'allows users to get a list of failed imports'
it 'allows users to get a list of succeeded imports'

Loading…
Cancel
Save