Skip to content

Commit 3514243

Browse files
committed
fix tests
1 parent f85c14e commit 3514243

File tree

5 files changed

+35
-33
lines changed

5 files changed

+35
-33
lines changed

src/containers/views/tests/documentedit.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { DocumentEdit } from '../DocumentEdit';
77
import Errors from '../../../components/Errors';
88
import Button from '../../../components/Button';
99

10-
import { doc } from './fixtures';
10+
import { config, doc } from './fixtures';
1111

1212
const defaultProps = {
1313
currentDocument: doc,
@@ -17,7 +17,7 @@ const defaultProps = {
1717
isFetching: false,
1818
router: {},
1919
route: {},
20-
config: {},
20+
config: config,
2121
params: { collection_name: "movies", splat: [null, "inception", "md"] }
2222
};
2323

src/containers/views/tests/documentnew.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { DocumentNew } from '../DocumentNew';
77
import Errors from '../../../components/Errors';
88
import Button from '../../../components/Button';
99

10-
import { doc } from './fixtures';
10+
import { config, doc } from './fixtures';
1111

1212
const defaultProps = {
1313
errors: [],
1414
fieldChanged: false,
1515
updated: false,
1616
router: {},
1717
route: {},
18-
config: {},
18+
config: config,
1919
params: { collection_name: doc.collection }
2020
};
2121

src/containers/views/tests/pageedit.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { PageEdit } from '../PageEdit';
77
import Errors from '../../../components/Errors';
88
import Button from '../../../components/Button';
99

10-
import { page } from './fixtures';
10+
import { config, page } from './fixtures';
1111

1212
const defaultProps = {
1313
page: page,
@@ -17,7 +17,7 @@ const defaultProps = {
1717
isFetching: false,
1818
router: {},
1919
route: {},
20-
config: {},
20+
config: config,
2121
params: { splat: [null, "page", "md"] }
2222
};
2323

src/containers/views/tests/pagenew.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { PageNew } from '../PageNew';
77
import Errors from '../../../components/Errors';
88
import Button from '../../../components/Button';
99

10-
import { page } from './fixtures';
10+
import { config, page } from './fixtures';
1111

1212
const defaultProps = {
1313
errors: [],
1414
fieldChanged: false,
1515
updated: false,
1616
router: {},
1717
route: {},
18-
config: {},
18+
config: config,
1919
params: { splat: 'page-dir' }
2020
};
2121

src/utils/tests/fixtures/index.js

+27-25
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,34 @@ export const emptyState = {
3535
};
3636

3737
export const config = {
38-
defaults: [
39-
{
40-
scope: {
41-
path: ''
42-
},
43-
values: {
44-
some_front_matter: 'default'
45-
}
46-
},
47-
{
48-
scope: {
49-
type: 'posts',
50-
path: ''
38+
content: {
39+
defaults: [
40+
{
41+
scope: {
42+
path: ''
43+
},
44+
values: {
45+
some_front_matter: 'default'
46+
}
5147
},
52-
values: {
53-
post_field: 'default'
54-
}
55-
},
56-
{
57-
scope: {
58-
type: 'pages',
59-
path: 'test'
48+
{
49+
scope: {
50+
type: 'posts',
51+
path: ''
52+
},
53+
values: {
54+
post_field: 'default'
55+
}
6056
},
61-
values: {
62-
page_field: 'default'
57+
{
58+
scope: {
59+
type: 'pages',
60+
path: 'test'
61+
},
62+
values: {
63+
page_field: 'default'
64+
}
6365
}
64-
}
65-
]
66+
]
67+
}
6668
};

0 commit comments

Comments
 (0)