Skip to content

Commit

Permalink
Merge pull request #247 from cfpb/date-fix
Browse files Browse the repository at this point in the history
Date fix
  • Loading branch information
sephcoster authored Apr 28, 2020
2 parents 250d61b + 42d6fff commit 2e5fb33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/__snapshots__/App.spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ exports[`initial state renders without crashing 1`] = `
className="a-text-input"
id="date_received-from"
max={null}
min={2011-11-30T12:00:00.000Z}
min={2011-12-01T12:00:00.000Z}
onChange={[Function]}
placeholder="mm/dd/yyyy"
size="15"
Expand Down Expand Up @@ -407,7 +407,7 @@ exports[`initial state renders without crashing 1`] = `
className="a-text-input"
id="date_received-through"
max={null}
min={2011-11-30T12:00:00.000Z}
min={2011-12-01T12:00:00.000Z}
onChange={[Function]}
placeholder="mm/dd/yyyy"
size="15"
Expand Down Expand Up @@ -950,7 +950,7 @@ exports[`initial state renders without crashing 1`] = `
className="a-text-input"
id="company_received-from"
max={null}
min={2011-11-30T12:00:00.000Z}
min={2011-12-01T12:00:00.000Z}
onChange={[Function]}
placeholder="mm/dd/yyyy"
size="15"
Expand All @@ -972,7 +972,7 @@ exports[`initial state renders without crashing 1`] = `
className="a-text-input"
id="company_received-through"
max={null}
min={2011-11-30T12:00:00.000Z}
min={2011-12-01T12:00:00.000Z}
onChange={[Function]}
placeholder="mm/dd/yyyy"
size="15"
Expand Down
2 changes: 1 addition & 1 deletion src/constants/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export const MODAL_HID = 'MODAL_HID'
export const MODAL_SHOWN = 'MODAL_SHOWN'

export const DATE_RANGE_MIN = '2011-11-30T12:00:00.000Z'
export const DATE_RANGE_MIN = '2011-12-01T12:00:00.000Z'

// Modal Dialogs
export const MODAL_TYPE_DATA_EXPORT = 'MODAL_TYPE_DATA_EXPORT'
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/__tests__/query.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ describe( 'reducer:query', () => {
} )

expect( actual.queryString ).toContain( 'dateInterval=All' )
expect( actual.queryString ).toContain( '&date_received_min=2011-11-30&field=all&frm=100&size=100' )
expect( actual.queryString ).toContain( '&date_received_min=2011-12-01&field=all&frm=100&size=100' )
const diffMin = moment( actual.date_received_min ).diff( moment( types.DATE_RANGE_MIN ), 'days' )
expect( diffMin ).toEqual( 0 )
const diffMax = moment( actual.date_received_max ).diff( moment( new Date() ), 'days' )
Expand All @@ -559,7 +559,7 @@ describe( 'reducer:query', () => {
} )
expect( actual.queryString ).toContain( 'dateInterval=All' )
expect( actual.queryString )
.toContain( '&date_received_min=2011-11-30&' +
.toContain( '&date_received_min=2011-12-01&' +
'field=complaint_what_happened&frm=100&has_narrative=true&' +
'size=100' )

Expand Down

0 comments on commit 2e5fb33

Please sign in to comment.