datetime_utility_spec.js.coffee 983 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#= require lib/utils/datetime_utility

describe 'Date time utils', ->
  describe 'get day name', ->
    it 'should return Sunday', ->
      day = gl.utils.getDayName(new Date('07/17/2016'))
      expect(day).toBe('Sunday')

    it 'should return Monday', ->
      day = gl.utils.getDayName(new Date('07/18/2016'))
      expect(day).toBe('Monday')

    it 'should return Tuesday', ->
      day = gl.utils.getDayName(new Date('07/19/2016'))
      expect(day).toBe('Tuesday')

    it 'should return Wednesday', ->
      day = gl.utils.getDayName(new Date('07/20/2016'))
      expect(day).toBe('Wednesday')

    it 'should return Thursday', ->
      day = gl.utils.getDayName(new Date('07/21/2016'))
      expect(day).toBe('Thursday')

    it 'should return Friday', ->
      day = gl.utils.getDayName(new Date('07/22/2016'))
      expect(day).toBe('Friday')

    it 'should return Saturday', ->
      day = gl.utils.getDayName(new Date('07/23/2016'))
      expect(day).toBe('Saturday')