Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #80

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It is optimized to deliver industry-leading performance while lowering costs. The `loopback-connector-dashdb`
module is the LoopBack connector for dashDB.

The LoopBack DashDB connector supports:
The LoopBack DashDB connector supports:

- All [CRUD operations](http://loopback.io/doc/en/lb3/Creating-updating-and-deleting-data.html).
- [Queries](http://loopback.io/doc/en/lb3/Querying-data.html) with fields, limit, order, skip and where filters.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"main": "index.js",
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"pretest": "node pretest.js",
"test": "mocha --timeout 20000 --require test/init.js",
"posttest": "npm run lint"
Expand Down
18 changes: 12 additions & 6 deletions test/discovery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,20 @@ describe('Discover LDL schema from a table', function() {

assert(schema.name === 'Inventory');
assert(
schema.options.dashdb.schema.replace(/\s/g, '') === config.schema);
schema.options.dashdb.schema.replace(/\s/g, '') === config.schema
);
assert(schema.options.dashdb.table === 'INVENTORY');
assert(schema.properties.productId);
assert(schema.properties.productId.required);
assert(schema.properties.productId.type === 'String');
assert(
schema.properties.productId.dashdb.columnName === 'PRODUCT_ID');
schema.properties.productId.dashdb.columnName === 'PRODUCT_ID'
);
assert(schema.properties.locationId);
assert(schema.properties.locationId.type === 'String');
assert(
schema.properties.locationId.dashdb.columnName === 'LOCATION_ID');
schema.properties.locationId.dashdb.columnName === 'LOCATION_ID'
);
assert(schema.properties.available);
assert(schema.properties.available.required === false);
assert(schema.properties.available.type === 'Number');
Expand Down Expand Up @@ -301,16 +304,19 @@ describe('Discover and build models', function() {
'Inventory model should be discovered and built');
var schema = models.Inventory.definition;
assert(
schema.settings.dashdb.schema.replace(/\s/g, '') === config.schema);
schema.settings.dashdb.schema.replace(/\s/g, '') === config.schema
);
assert(schema.settings.dashdb.table === 'INVENTORY');
assert(schema.properties.productId);
assert(schema.properties.productId.type === String);
assert(
schema.properties.productId.dashdb.columnName === 'PRODUCT_ID');
schema.properties.productId.dashdb.columnName === 'PRODUCT_ID'
);
assert(schema.properties.locationId);
assert(schema.properties.locationId.type === String);
assert(
schema.properties.locationId.dashdb.columnName === 'LOCATION_ID');
schema.properties.locationId.dashdb.columnName === 'LOCATION_ID'
);
assert(schema.properties.available);
assert(schema.properties.available.type === Number);
assert(schema.properties.total);
Expand Down