Skip to content

Commit

Permalink
test(url parser): add override options test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Nov 20, 2017
1 parent 5542bcc commit 6c7eccb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/functional/url_parser_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,30 @@ describe('Url SRV Parser', function() {
}
});

/**
* @ignore
*/
it('should build a connection string based on SRV, TXT records and option override', {
metadata: {
requires: { topology: ['single'] }
},
test: function(done) {
// This url has txt and srv records and options passed in through api
parse('mongodb+srv://test6.test.build.10gen.cc', { connectTimeoutMS: 250000 }, function(
err,
object
) {
expect(err).to.be.null;
expect(object).to.exist;
expect(object.servers[0].host).to.equal('localhost.build.10gen.cc');
expect(object.servers[0].port).to.equal(27017);
// TODO check all options get override
expect(object.db_options.connectTimeoutMS).to.equal(250000);
done();
});
}
});

// /**
// * @ignore
// */
Expand Down

0 comments on commit 6c7eccb

Please sign in to comment.