Skip to content

Commit

Permalink
name of helter method changed
Browse files Browse the repository at this point in the history
  • Loading branch information
lkrnac committed Oct 27, 2014
1 parent 5d34f8c commit 250f970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/jasstorPromiseSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Jasstor from '../dist/jasstor.js';

var credentialsFile = 'testCredentials.txt';

var readFilePromise = function (credentialsFile, userName, done) {
var readPassword = (credentialsFile, userName, done) => {
return fs.readFileAsync(credentialsFile)
.then(JSON.parse)
.then(jsonData => {
Expand Down Expand Up @@ -51,7 +51,7 @@ describe('jasstor tested with promises', () => {
it('should store encrypted password', done => {
jasstor.saveCredentialsAsync('user', 'password', 'role')
.then(() => {
var password = readFilePromise(credentialsFile, 'user', done);
var password = readPassword(credentialsFile, 'user', done);
password.should.not.equal('password');
done();
}).catch(done);
Expand All @@ -71,11 +71,11 @@ describe('jasstor tested with promises', () => {
});

it('should overwrite existing password', done => {
var originalPassword = readFilePromise(credentialsFile, 'user', done);
var originalPassword = readPassword(credentialsFile, 'user', done);
var newPassword;
jasstor.saveCredentialsAsync('user', 'password1', 'role')
.then(() => {
newPassword = readFilePromise(credentialsFile, 'user', done);
newPassword = readPassword(credentialsFile, 'user', done);
newPassword.should.be.ok;
originalPassword.should.be.ok;
newPassword.should.not.equal(originalPassword);
Expand Down

0 comments on commit 250f970

Please sign in to comment.