File size: 571 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
import { http } from 'calypso/state/data-layer/wpcom-http/actions';
import { requestSite } from 'calypso/state/reader/sites/actions';
import { requestReadSite } from '../';

describe( 'read-sites-site', () => {
	describe( 'requestReadSite', () => {
		test( 'should dispatch an http request', () => {
			const blogId = 123;
			const action = requestSite( blogId );

			expect( requestReadSite( action ) ).toMatchObject(
				http(
					{
						apiVersion: '1.1',
						method: 'GET',
						path: `/read/sites/${ blogId }`,
					},
					action
				)
			);
		} );
	} );
} );