check that app patch releases does not send email

This commit is contained in:
Girish Ramakrishnan
2016-04-12 13:49:49 -07:00
parent 53268b67dc
commit 115ed12c36
2 changed files with 15 additions and 1 deletions

View File

@@ -313,6 +313,20 @@ describe('updatechecker - checkAppUpdates', function () {
});
});
it('does not send mail for patch releases', function (done) {
nock.cleanAll();
var scope = nock('http://localhost:4444')
.post('/api/v1/appupdates')
.reply(200, { appVersions: { 'io.cloudron.app': { manifest: { version: '1.0.1' } } } });
updatechecker.checkAppUpdates(function (error) {
expect(!error).to.be.ok();
expect(updatechecker.getUpdateInfo().apps).to.eql({ 'appid-0': { manifest: { version: '1.0.1' } } }); // got the update
checkMails(0, done); // but no email sent since patch release
});
});
it('does not offer old version', function (done) {
nock.cleanAll();