Skip to content

Commit d13086b

Browse files
committed
Fixed failing test
1 parent c296003 commit d13086b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/v1/internal/connector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ function connect( url, config = {}) {
423423
host: host(url),
424424
port: port(url) || 7687,
425425
// Default to using encryption if trust-on-first-use is available
426-
encrypted : config.encrypted || hasFeature("trust_on_first_use"),
426+
encrypted : (config.encrypted == null) ? hasFeature("trust_on_first_use") : config.encrypted,
427427
// Default to using trust-on-first-use if it is available
428428
trust : config.trust || (hasFeature("trust_on_first_use") ? "TRUST_ON_FIRST_USE" : "TRUST_SIGNED_CERTIFICATES"),
429429
trustedCertificates : config.trustedCertificates || [],

test/internal/connector.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('connector', function() {
7676

7777
it('should provide error message when connecting to http-port', function(done) {
7878
// Given
79-
var conn = connect("bolt://localhost:7474");
79+
var conn = connect("bolt://localhost:7474", {encrypted:false});
8080

8181
// When
8282
conn.initialize( "mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"}, {

0 commit comments

Comments
 (0)