Skip to content

Commit

Permalink
Test highlighting on month boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
chadnickbok committed Sep 8, 2016
1 parent ea2dc04 commit f0e058a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tests/DateRangePicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,18 @@ describe('The DateRangePicker component', function () {
expect(calendarMonthComponent.props.highlightedRange).toBe(highlightedRange);
});

it('is set to highlightedRange on month boundaries', function () {
var highlightedRange = moment.range(moment('2016 07 31', 'YYYY MM DD'), moment('2016 08 01', 'YYYY MM DD'));
this.useDocumentRenderer({
firstOfWeek: 1,
initialYear: 2016,
initialMonth: 6,
});
this.renderedComponent.highlightRange(highlightedRange);
var calendarMonthComponent = TestUtils.scryRenderedComponentsWithType(this.renderedComponent, CalendarMonth)[0];
expect(calendarMonthComponent.props.highlightedRange).toBe(highlightedRange);
});

});

describe('each component takes in a large number of other attributes', function () {
Expand Down

0 comments on commit f0e058a

Please sign in to comment.