@@ -128,9 +128,9 @@ describe('Access', function () {
128
128
129
129
it ( 'handles no user' , function ( ) {
130
130
// Regression test for the share sheet.
131
- ConfigStore . config = {
131
+ ConfigStore . config = TestStubs . Config ( {
132
132
user : null ,
133
- } ;
133
+ } ) ;
134
134
135
135
render ( < Access > { childrenMock } </ Access > , { context : routerContext , organization} ) ;
136
136
@@ -141,9 +141,10 @@ describe('Access', function () {
141
141
} ) ;
142
142
143
143
it ( 'is superuser' , function ( ) {
144
- ConfigStore . config = {
145
- user : { isSuperuser : true } ,
146
- } ;
144
+ ConfigStore . config = TestStubs . Config ( {
145
+ user : TestStubs . User ( { isSuperuser : true } ) ,
146
+ } ) ;
147
+
147
148
render ( < Access isSuperuser > { childrenMock } </ Access > , {
148
149
context : routerContext ,
149
150
organization,
@@ -156,9 +157,10 @@ describe('Access', function () {
156
157
} ) ;
157
158
158
159
it ( 'is not superuser' , function ( ) {
159
- ConfigStore . config = {
160
- user : { isSuperuser : false } ,
161
- } ;
160
+ ConfigStore . config = TestStubs . Config ( {
161
+ user : TestStubs . User ( { isSuperuser : false } ) ,
162
+ } ) ;
163
+
162
164
render ( < Access isSuperuser > { childrenMock } </ Access > , {
163
165
context : routerContext ,
164
166
organization,
@@ -195,9 +197,10 @@ describe('Access', function () {
195
197
} ) ;
196
198
197
199
it ( 'has superuser' , function ( ) {
198
- ConfigStore . config = {
199
- user : { isSuperuser : true } ,
200
- } ;
200
+ ConfigStore . config = TestStubs . Config ( {
201
+ user : TestStubs . User ( { isSuperuser : true } ) ,
202
+ } ) ;
203
+
201
204
render (
202
205
< Access isSuperuser >
203
206
< p > The Child</ p >
@@ -209,9 +212,10 @@ describe('Access', function () {
209
212
} ) ;
210
213
211
214
it ( 'has no superuser' , function ( ) {
212
- ConfigStore . config = {
213
- user : { isSuperuser : false } ,
214
- } ;
215
+ ConfigStore . config = TestStubs . Config ( {
216
+ user : TestStubs . User ( { isSuperuser : false } ) ,
217
+ } ) ;
218
+
215
219
render (
216
220
< Access isSuperuser >
217
221
< p > The Child</ p >
0 commit comments