Skip to content

Commit

Permalink
Add parse URL connection string tests for MSSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
h0vhannes committed Apr 11, 2016
1 parent e49b0d4 commit 8e41a33
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/tape/parse-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ test('parses maria connections, aliasing database to db', function(t) {
t.deepEqual(parseConnection('mariadb://username:pass@path.to.some-url:6000/testdb'), maria)
})

test('parses mssql connections, aliasing host to server', function(t) {
t.plan(1)
var mssql = {
client: 'mssql',
connection: {
user: 'username',
password: 'pass',
server: 'path.to.some-url',
port: '6000',
database: 'testdb'
}
}
t.deepEqual(parseConnection('mssql://username:pass@path.to.some-url:6000/testdb'), mssql)
})

test('assume a path is mysql', function(t) {
t.plan(1)
t.deepEqual(parseConnection('/path/to/file.db'), {
Expand Down

0 comments on commit 8e41a33

Please sign in to comment.