Skip to content

Commit

Permalink
Add test for Include category support in PostgresCursor
Browse files Browse the repository at this point in the history
Co-authored-by: Dmytro Nechai <nechaido@gmail.com>
  • Loading branch information
belochub and nechaido committed Nov 29, 2018
1 parent 9a439ff commit 6c34e70
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion test/pg.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,32 @@ prepareDB(err => {

metatests.test('PostgresProvider test', test => {
test.endAfterSubtests();
// TODO: add tests

test.test('gs.select from category with Include', test => {
const company = {
Name: 'CompanyName',
Address: {
Country: 'Country',
City: 'City',
},
};

provider.create('Company', company, (err, id) => {
test.error(err);
test.assert(id);
company.Id = id;
company.Address.Id = id;

provider.select('Company', { Name: company.Name }).fetch(
(error, result) => {
test.error(error);
test.strictEqual(result.length, 1);
const [selectedCompany] = result;
test.strictSame(selectedCompany, company);
test.end();
}
);
});
}, { todo: true });
});
});

0 comments on commit 6c34e70

Please sign in to comment.