@@ -128,9 +128,9 @@ describe('Access', function () {
128128
129129 it ( 'handles no user' , function ( ) {
130130 // Regression test for the share sheet.
131- ConfigStore . config = {
131+ ConfigStore . config = TestStubs . Config ( {
132132 user : null ,
133- } ;
133+ } ) ;
134134
135135 render ( < Access > { childrenMock } </ Access > , { context : routerContext , organization} ) ;
136136
@@ -141,9 +141,10 @@ describe('Access', function () {
141141 } ) ;
142142
143143 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+
147148 render ( < Access isSuperuser > { childrenMock } </ Access > , {
148149 context : routerContext ,
149150 organization,
@@ -156,9 +157,10 @@ describe('Access', function () {
156157 } ) ;
157158
158159 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+
162164 render ( < Access isSuperuser > { childrenMock } </ Access > , {
163165 context : routerContext ,
164166 organization,
@@ -195,9 +197,10 @@ describe('Access', function () {
195197 } ) ;
196198
197199 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+
201204 render (
202205 < Access isSuperuser >
203206 < p > The Child</ p >
@@ -209,9 +212,10 @@ describe('Access', function () {
209212 } ) ;
210213
211214 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+
215219 render (
216220 < Access isSuperuser >
217221 < p > The Child</ p >
0 commit comments