Skip to content

Commit

Permalink
Add test case for pending to isEditedPostDateFloating suite (#13256)
Browse files Browse the repository at this point in the history
  • Loading branch information
davisshaver authored and earnjam committed Jan 10, 2019
1 parent 59d48ff commit 85aa580
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,24 @@ describe( 'selectors', () => {

expect( isEditedPostDateFloating( state ) ).toBe( false );
} );

it( 'should return true for pending posts', () => {
const state = {
currentPost: {
date: '2018-09-27T01:23:45.678Z',
modified: '2018-09-27T01:23:45.678Z',
status: 'pending',
},
editor: {
present: {
edits: {},
},
},
initialEdits: {},
};

expect( isEditedPostDateFloating( state ) ).toBe( true );
} );
} );

describe( 'getBlockDependantsCacheBust', () => {
Expand Down

0 comments on commit 85aa580

Please sign in to comment.