[#162,refactor][s]: backend is now string in 'normal' set of Dataset arguments.
This commit is contained in:
@@ -25,10 +25,9 @@ test("parseCSV", function() {
|
||||
'"Xyz ""ABC"" O\'Brien", 11:35\n' +
|
||||
'"Other, AN", 12:35\n';
|
||||
var dataset = new recline.Model.Dataset({
|
||||
data: csv
|
||||
},
|
||||
'csv'
|
||||
);
|
||||
data: csv,
|
||||
backend: 'csv'
|
||||
});
|
||||
dataset.fetch();
|
||||
equal(dataset.currentRecords.length, 3);
|
||||
var row = dataset.currentRecords.models[0].toJSON();
|
||||
|
||||
@@ -71,9 +71,9 @@ test('DataProxy Backend', function() {
|
||||
equal(backend.__type__, 'dataproxy');
|
||||
|
||||
var dataset = new recline.Model.Dataset({
|
||||
url: 'http://webstore.thedatahub.org/rufuspollock/gold_prices/data.csv'
|
||||
},
|
||||
'dataproxy'
|
||||
url: 'http://webstore.thedatahub.org/rufuspollock/gold_prices/data.csv',
|
||||
backend: 'dataproxy'
|
||||
}
|
||||
);
|
||||
|
||||
var stub = sinon.stub($, 'ajax', function(options) {
|
||||
|
||||
@@ -250,10 +250,9 @@ module("Backend ElasticSearch - Recline");
|
||||
|
||||
test("query", function() {
|
||||
var dataset = new recline.Model.Dataset({
|
||||
url: 'https://localhost:9200/my-es-db/my-es-type'
|
||||
},
|
||||
'elasticsearch'
|
||||
);
|
||||
url: 'https://localhost:9200/my-es-db/my-es-type',
|
||||
backend: 'elasticsearch'
|
||||
});
|
||||
|
||||
var stub = sinon.stub($, 'ajax', function(options) {
|
||||
if (options.url.indexOf('_mapping') != -1) {
|
||||
@@ -292,10 +291,9 @@ test("query", function() {
|
||||
|
||||
test("write", function() {
|
||||
var dataset = new recline.Model.Dataset({
|
||||
url: 'http://localhost:9200/recline-test/es-write'
|
||||
},
|
||||
'elasticsearch'
|
||||
);
|
||||
url: 'http://localhost:9200/recline-test/es-write',
|
||||
backend: 'elasticsearch'
|
||||
});
|
||||
|
||||
stop();
|
||||
|
||||
|
||||
@@ -169,10 +169,9 @@ var sample_gdocs_spreadsheet_data = {
|
||||
|
||||
test("GDocs Backend", function() {
|
||||
var dataset = new recline.Model.Dataset({
|
||||
url: 'https://spreadsheets.google.com/feeds/list/0Aon3JiuouxLUdDQwZE1JdV94cUd6NWtuZ0IyWTBjLWc/od6/public/values?alt=json'
|
||||
},
|
||||
'gdocs'
|
||||
);
|
||||
url: 'https://spreadsheets.google.com/feeds/list/0Aon3JiuouxLUdDQwZE1JdV94cUd6NWtuZ0IyWTBjLWc/od6/public/values?alt=json',
|
||||
backend: 'gdocs'
|
||||
});
|
||||
|
||||
var stub = sinon.stub($, 'getJSON', function(options, cb) {
|
||||
var partialUrl = 'spreadsheets.google.com';
|
||||
|
||||
Reference in New Issue
Block a user