diff --git a/src/test/updatechecker-test.js b/src/test/updatechecker-test.js index 28ec6c2fc..74e749a2a 100644 --- a/src/test/updatechecker-test.js +++ b/src/test/updatechecker-test.js @@ -54,6 +54,7 @@ var RELEASE_2 = { var RELEASES = { "1.0.0": RELEASE_1, + "1.0.1": RELEASE_1, "2.0.0-pre0": RELEASE_2_PRERELEASE, "2.0.0": RELEASE_2 }; @@ -183,6 +184,21 @@ describe('updatechecker - checkBoxUpdates', function () { }); }); + it('does not send mail for patch releases', function (done) { + var releaseCopy = deepExtend({}, RELEASES); + releaseCopy['1.0.0'].next = '1.0.1'; + + var scope = nock('http://localhost:4444') + .get('/release.json') + .reply(200, releaseCopy); + + updatechecker.checkBoxUpdates(function (error) { + expect(!error).to.be.ok(); + expect(updatechecker.getUpdateInfo().box.version).to.be('1.0.1'); // got the update + checkMails(0, done); // but no email sent since patch release + }); + }); + it('bad response offers nothing', function (done) { nock.cleanAll();