@@ -16,18 +16,22 @@ describe('pushPath', () => {
16
16
it ( 'creates actions' , ( ) => {
17
17
expect ( pushPath ( '/foo' , { bar : 'baz' } ) ) . toEqual ( {
18
18
type : UPDATE_PATH ,
19
- path : '/foo' ,
20
- replace : false ,
21
- state : { bar : 'baz' } ,
22
- avoidRouterUpdate : false
19
+ payload : {
20
+ path : '/foo' ,
21
+ replace : false ,
22
+ state : { bar : 'baz' } ,
23
+ avoidRouterUpdate : false
24
+ }
23
25
} ) ;
24
26
25
27
expect ( pushPath ( '/foo' , undefined , { avoidRouterUpdate : true } ) ) . toEqual ( {
26
28
type : UPDATE_PATH ,
27
- path : '/foo' ,
28
- state : undefined ,
29
- replace : false ,
30
- avoidRouterUpdate : true
29
+ payload : {
30
+ path : '/foo' ,
31
+ state : undefined ,
32
+ replace : false ,
33
+ avoidRouterUpdate : true
34
+ }
31
35
} ) ;
32
36
} ) ;
33
37
} ) ;
@@ -36,26 +40,32 @@ describe('replacePath', () => {
36
40
it ( 'creates actions' , ( ) => {
37
41
expect ( replacePath ( '/foo' , { bar : 'baz' } ) ) . toEqual ( {
38
42
type : UPDATE_PATH ,
39
- path : '/foo' ,
40
- replace : true ,
41
- state : { bar : 'baz' } ,
42
- avoidRouterUpdate : false
43
+ payload : {
44
+ path : '/foo' ,
45
+ replace : true ,
46
+ state : { bar : 'baz' } ,
47
+ avoidRouterUpdate : false
48
+ }
43
49
} ) ;
44
50
45
51
expect ( replacePath ( '/foo' , undefined , { avoidRouterUpdate : true } ) ) . toEqual ( {
46
52
type : UPDATE_PATH ,
47
- path : '/foo' ,
48
- state : undefined ,
49
- replace : true ,
50
- avoidRouterUpdate : true
53
+ payload : {
54
+ path : '/foo' ,
55
+ state : undefined ,
56
+ replace : true ,
57
+ avoidRouterUpdate : true
58
+ }
51
59
} ) ;
52
60
53
61
expect ( replacePath ( '/foo' , undefined , { avoidRouterUpdate : false } ) ) . toEqual ( {
54
62
type : UPDATE_PATH ,
55
- path : '/foo' ,
56
- state : undefined ,
57
- replace : true ,
58
- avoidRouterUpdate : false
63
+ payload : {
64
+ path : '/foo' ,
65
+ state : undefined ,
66
+ replace : true ,
67
+ avoidRouterUpdate : false
68
+ }
59
69
} ) ;
60
70
} ) ;
61
71
} ) ;
@@ -69,8 +79,10 @@ describe('routeReducer', () => {
69
79
it ( 'updates the path' , ( ) => {
70
80
expect ( routeReducer ( state , {
71
81
type : UPDATE_PATH ,
72
- path : '/bar' ,
73
- replace : false
82
+ payload : {
83
+ path : '/bar' ,
84
+ replace : false
85
+ }
74
86
} ) ) . toEqual ( {
75
87
path : '/bar' ,
76
88
replace : false ,
@@ -82,9 +94,11 @@ describe('routeReducer', () => {
82
94
it ( 'respects replace' , ( ) => {
83
95
expect ( routeReducer ( state , {
84
96
type : UPDATE_PATH ,
85
- path : '/bar' ,
86
- replace : true ,
87
- avoidRouterUpdate : false
97
+ payload : {
98
+ path : '/bar' ,
99
+ replace : true ,
100
+ avoidRouterUpdate : false
101
+ }
88
102
} ) ) . toEqual ( {
89
103
path : '/bar' ,
90
104
replace : true ,
@@ -96,9 +110,11 @@ describe('routeReducer', () => {
96
110
it ( 'respects `avoidRouterUpdate` flag' , ( ) => {
97
111
expect ( routeReducer ( state , {
98
112
type : UPDATE_PATH ,
99
- path : '/bar' ,
100
- replace : false ,
101
- avoidRouterUpdate : true
113
+ payload : {
114
+ path : '/bar' ,
115
+ replace : false ,
116
+ avoidRouterUpdate : true
117
+ }
102
118
} ) ) . toEqual ( {
103
119
path : '/bar' ,
104
120
replace : false ,
0 commit comments