spec/td/client/export_api_spec.rb in td-client-0.8.85 vs spec/td/client/export_api_spec.rb in td-client-0.9.0dev1
- old
+ new
@@ -18,11 +18,11 @@
# TODO: Use correnty values
params = {'file_format' => 'json.gz', 'bucket' => 'bin', 'access_key_id' => 'id', 'secret_access_key' => 'secret'}
stub_api_request(:post, "/v3/export/run/#{e(db_name)}/#{e(table_name)}").with(:body => params.merge('storage_type' => storage_type)).
to_return(:body => {'database' => db_name, 'job_id' => '1', 'debug' => {}}.to_json)
- expect(api.export(db_name, table_name, storage_type, params)).to eq('1')
+ api.export(db_name, table_name, storage_type, params).should == '1'
end
it 'should return 400 error with invalid storage type' do
invalid_type = 'gridfs'
params = {'storage_type' => invalid_type}
@@ -34,18 +34,8 @@
api.export(db_name, table_name, invalid_type)
}.to raise_error(TreasureData::APIError, /#{err_msg}/)
end
# TODO: Add other parameters spec
- end
-
- describe 'result_export' do
- it 'should export result successfully' do
- params = {'result' => 'mysql://user:pass@host.com/database/table'}
- stub_api_request(:post, "/v3/job/result_export/100").with(:body => params).
- to_return(:body => {'job_id' => '101'}.to_json)
-
- expect(api.result_export(100, params)).to eq('101')
- end
end
end