require('should');
var Moment = require('moment');
var Utils = require('../src/utils');
var Config = require('../config');

describe('retrieveFlightDatesArray test', () => {
  it('should generate 3 dates, in days 7, 9, 11-09-2015 from a moment', (done) => {
    let moment = new Moment('05-09-2015', Config.DATE_FORMAT);
    let dates = Utils.retrieveFlightDatesArray(moment, 3, 48);
    (dates[0]).should.be.equal('07-09-2015');
    (dates[1]).should.be.equal('09-09-2015');
    (dates[2]).should.be.equal('11-09-2015');
    done();
  });
  it('should generate 45 dates from a string', (done) => {
    let todayDate = new Moment(new Date().toISOString()).format(Config.DATE_FORMAT);
    let dates = Utils.retrieveFlightDatesArray(todayDate, 45, 24);
    (dates.length).should.be.exactly(45);
    let todayMoment = new Moment().add(45, 'days').format(Config.DATE_FORMAT);
    todayMoment.should.be.equal(dates[44]);
    done();
  });
});
@@ -410,17 +410,17 @@
 equal('0
-7
+5
 -09-2015
@@ -456,17 +456,17 @@
 equal('0
-9
+7
 -09-2015
@@ -501,18 +501,18 @@
 .equal('
-11
+09
 -09-2015
@@ -826,17 +826,17 @@
 ().add(4
-5
+4
 , 'days'

fix tests due to recent changes on way dates are retrieved