Skip to content

Commit

Permalink
Ensure that key ends with a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Nov 11, 2015
1 parent 75c56f8 commit c473d9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/provision.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ exports['Tessel.prototype.provisionTessel'] = {
fallbackKeyPath: function(test) {
var self = this;

test.expect(3);
test.expect(4);

this.isProvisioned = sinon.stub(Tessel, 'isProvisioned', function() {
return false;
Expand All @@ -368,6 +368,10 @@ exports['Tessel.prototype.provisionTessel'] = {
test.equal(path.dirname(self.writeFileSpy.firstCall.args[0]), testPath);
test.equal(path.dirname(self.writeFileSpy.lastCall.args[0]), testPath);

// Ensure that key ends with a newline
var publicKey = self.writeFileSpy.firstCall.args[1];
test.equal(publicKey[publicKey.length - 1], '\n');

Tessel.TESSEL_AUTH_PATH = tesselAuthPath;
self.isProvisioned.restore();
// End the test
Expand Down

0 comments on commit c473d9d

Please sign in to comment.