Skip to content

Commit

Permalink
Update assertions in test case to make it more explicit.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmohit committed Jun 25, 2022
1 parent 24a7d87 commit e836e4d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,16 @@ describe( 'core/modules sharing-settings', () => {
.dispatch( CORE_MODULES )
.setSharedRoles( 'analytics', [ 'editor', 'subscriber' ] );

// Assert that the changed settings and saved settings aren't same.
expect( store.getState().sharingSettings ).not.toMatchObject(
store.getState().savedSharingSettings
);

registry.dispatch( CORE_MODULES ).rollbackSharingSettings();

// Assert that the changed settings have rolled back to saved settings.
expect( store.getState().sharingSettings ).toMatchObject(
sharingSettings
store.getState().savedSharingSettings
);
} );
} );
Expand Down

0 comments on commit e836e4d

Please sign in to comment.