diff --git a/ui/spec/dashboards/reducers/dashTimeV1Spec.js b/ui/spec/dashboards/reducers/dashTimeV1Spec.js index ed32e211b2..3b69a72623 100644 --- a/ui/spec/dashboards/reducers/dashTimeV1Spec.js +++ b/ui/spec/dashboards/reducers/dashTimeV1Spec.js @@ -33,22 +33,26 @@ describe('Dashboards.Reducers.DashTimeV1', () => { const state = { ranges: [{dashboardID, timeRange}], } + const dashboard = {id: dashboardID} - const actual = reducer(state, deleteDashboard({}, dashboardID)) + const actual = reducer(state, deleteDashboard(dashboard)) const expected = [] expect(actual.ranges).to.deep.equal(expected) }) - it('can updated a dashboard time range', () => { + it('can update a dashboard time range', () => { const state = { ranges: [{dashboardID, timeRange}], } - const newTimeRange = {upper: '2017-10-07 12:05', lower: '2017-10-05 12:04'} + const {upper, lower} = { + upper: '2017-10-07 12:05', + lower: '2017-10-05 12:04', + } - const actual = reducer(state, updateDashTimeV1(dashboardID, newTimeRange)) - const expected = [{dashboardID, timeRange: newTimeRange}] + const actual = reducer(state, updateDashTimeV1(dashboardID, {upper, lower})) + const expected = [{dashboardID, upper, lower}] expect(actual.ranges).to.deep.equal(expected) }) diff --git a/ui/spec/normalizers/dashboardTimeSpec.js b/ui/spec/normalizers/dashboardTimeSpec.js index 25921a8fdb..e6c38dfc26 100644 --- a/ui/spec/normalizers/dashboardTimeSpec.js +++ b/ui/spec/normalizers/dashboardTimeSpec.js @@ -1,4 +1,3 @@ -import sinon from 'sinon' import normalizer from 'src/normalizers/dashboardTime' const dashboardID = 1 @@ -6,7 +5,7 @@ const upper = null const lower = 'now() - 15m' const timeRange = {dashboardID, upper, lower} -describe.only('Normalizers.DashboardTime', () => { +describe('Normalizers.DashboardTime', () => { it('can filter out non-objects', () => { const ranges = [1, null, undefined, 'string', timeRange]