File size: 782 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import { ADMIN_MENU_REQUEST, ADMIN_MENU_RECEIVE } from 'calypso/state/action-types';
import { requestAdminMenu, receiveAdminMenu } from '../actions';
import menuFixture from './fixture/menu-fixture';
describe( 'actions', () => {
describe( 'requestAdminMenu', () => {
test( 'creates action with correct action type and args', () => {
const action = requestAdminMenu( 466422 );
expect( action ).toEqual( {
type: ADMIN_MENU_REQUEST,
siteId: 466422,
} );
} );
} );
describe( 'receiveAdminMenu', () => {
test( 'creates action with correct action type and args', () => {
const action = receiveAdminMenu( 374948, menuFixture );
expect( action ).toEqual( {
type: ADMIN_MENU_RECEIVE,
siteId: 374948,
menu: menuFixture,
} );
} );
} );
} );
|