mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
* Work on converting lib to standard * Finish updating lib * Finish linting lib * Format test files * Add .eslintrc with standard format * Supply full path to eslint bin * Move lint command to package.json * Add eslint as dev dependency
22 lines
641 B
JavaScript
22 lines
641 B
JavaScript
'use strict'
|
|
|
|
const createClient = require('./test-helper').createClient
|
|
|
|
/*
|
|
* TODO: Add _some_ comments to explain what it is we're testing, and how the
|
|
* code-being-tested works behind the scenes.
|
|
*/
|
|
|
|
test('cleartext password authentication', function () {
|
|
var client = createClient()
|
|
client.password = '!'
|
|
client.connection.stream.packets = []
|
|
client.connection.emit('authenticationCleartextPassword')
|
|
test('responds with password', function () {
|
|
var packets = client.connection.stream.packets
|
|
assert.lengthIs(packets, 1)
|
|
var packet = packets[0]
|
|
assert.equalBuffers(packet, [0x70, 0, 0, 0, 6, 33, 0])
|
|
})
|
|
})
|