Skip to content

Commit

Permalink
fix(commands.list): fix first file not sending
Browse files Browse the repository at this point in the history
  • Loading branch information
trs committed Mar 8, 2017
1 parent 83540d2 commit 6654f2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/commands/registration/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
})
return this.reply(150)
.then(() => {
if (fileList.length) return this.reply(...fileList);
if (fileList.length) return this.reply({}, ...fileList);
});
})
.then(() => {
Expand Down
6 changes: 3 additions & 3 deletions test/commands/list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ describe(CMD, done => {
CMDFN({log, command: {_: [CMD], directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(150);
expect(mockClient.reply.args[1][0]).to.have.property('raw');
expect(mockClient.reply.args[1][0]).to.have.property('message');
expect(mockClient.reply.args[1][0]).to.have.property('socket');
expect(mockClient.reply.args[1][1]).to.have.property('raw');
expect(mockClient.reply.args[1][1]).to.have.property('message');
expect(mockClient.reply.args[1][1]).to.have.property('socket');
expect(mockClient.reply.args[2][0]).to.equal(226);
done();
})
Expand Down
6 changes: 3 additions & 3 deletions test/commands/nlst.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ describe(CMD, done => {
CMDFN({log, command: {_: [CMD], directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(150);
expect(mockClient.reply.args[1][0]).to.have.property('raw');
expect(mockClient.reply.args[1][0]).to.have.property('message');
expect(mockClient.reply.args[1][0]).to.have.property('socket');
expect(mockClient.reply.args[1][1]).to.have.property('raw');
expect(mockClient.reply.args[1][1]).to.have.property('message');
expect(mockClient.reply.args[1][1]).to.have.property('socket');
expect(mockClient.reply.args[2][0]).to.equal(226);
done();
})
Expand Down

0 comments on commit 6654f2c

Please sign in to comment.