@@ -84,7 +84,7 @@ describe('Contentstack GlobalField test', () => {
8484 makeGlobalField ( )
8585 . create ( )
8686 . then ( ( globalField ) => {
87- checkGlobalField ( globalField . global_field )
87+ checkGlobalField ( globalField )
8888 done ( )
8989 } )
9090 . catch ( done )
@@ -120,7 +120,7 @@ describe('Contentstack GlobalField test', () => {
120120 } )
121121 . update ( )
122122 . then ( ( globalField ) => {
123- checkGlobalField ( globalField . global_field )
123+ checkGlobalField ( globalField )
124124 done ( )
125125 } )
126126 . catch ( done )
@@ -141,7 +141,7 @@ describe('Contentstack GlobalField test', () => {
141141 } )
142142 . fetch ( )
143143 . then ( ( globalField ) => {
144- checkGlobalField ( globalField . global_field )
144+ checkGlobalField ( globalField )
145145 done ( )
146146 } )
147147 . catch ( done )
@@ -222,7 +222,7 @@ describe('Contentstack GlobalField test (API Version 3.2)', () => {
222222 api_version : '3.2' } )
223223 expect ( globalField . urlPath ) . to . be . equal ( '/global_fields' )
224224 expect ( globalField . apiVersion ) . to . be . equal ( '3.2' )
225- expect ( globalField . stackHeaders ) . to . deep . equal ( { api_key : 'api_key' , api_version : '3.2' } )
225+ expect ( globalField . stackHeaders ) . to . deep . equal ( { api_key : 'api_key' } )
226226 done ( )
227227 } )
228228
@@ -300,7 +300,7 @@ describe('Contentstack GlobalField test (API Version 3.2)', () => {
300300 api_version : '3.2' } )
301301 . create ( )
302302 . then ( ( globalField ) => {
303- checkGlobalField ( globalField . global_field )
303+ checkGlobalField ( globalField )
304304 done ( )
305305 } )
306306 . catch ( done )
@@ -339,7 +339,7 @@ describe('Contentstack GlobalField test (API Version 3.2)', () => {
339339 } )
340340 . update ( )
341341 . then ( ( globalField ) => {
342- checkGlobalField ( globalField . global_field )
342+ checkGlobalField ( globalField )
343343 done ( )
344344 } )
345345 . catch ( done )
@@ -361,7 +361,7 @@ describe('Contentstack GlobalField test (API Version 3.2)', () => {
361361 } )
362362 . fetch ( )
363363 . then ( ( globalField ) => {
364- checkGlobalField ( globalField . global_field )
364+ checkGlobalField ( globalField )
365365 done ( )
366366 } )
367367 . catch ( done )
@@ -438,39 +438,6 @@ describe('Contentstack GlobalField test (API Version 3.2)', () => {
438438 } )
439439 . catch ( done )
440440 } )
441-
442- it ( 'should update nested global field' , ( done ) => {
443- var mock = new MockAdapter ( Axios )
444- const updatedData = {
445- global_field : {
446- title : 'Updated Nested Global Field Title' ,
447- schema : nestedGlobalFieldPayload
448- }
449- }
450-
451- mock
452- . onPut ( `/global_fields/${ systemUidMock . uid } ` )
453- . reply ( 200 , {
454- global_field : {
455- ...nestedGlobalFieldMock ,
456- ...updatedData . global_field
457- }
458- } )
459-
460- makeGlobalField ( {
461- global_field : {
462- ...systemUidMock
463- } ,
464- stackHeaders : stackHeadersMock
465- } )
466- . updateNestedGlobalField ( updatedData )
467- . then ( ( response ) => {
468- expect ( response . global_field . title ) . to . be . equal ( 'Updated Nested Global Field Title' )
469- expect ( response . global_field . schema ) . to . deep . equal ( nestedGlobalFieldPayload )
470- done ( )
471- } )
472- . catch ( done )
473- } )
474441} )
475442
476443function makeGlobalField ( data ) {
0 commit comments