@@ -31,14 +31,14 @@ describe('Contentstack BulkOperation test', () => {
3131
3232 it ( 'should add items to a release' , async ( ) => {
3333 const items = {
34- release : 'blt05e951e5f3a1d342 ' ,
34+ release : 'release_uid ' ,
3535 action : 'publish' ,
3636 locale : [ 'en-us' ] ,
3737 reference : true ,
3838 items : [
3939 {
4040 content_type_uid : 'ct_1' ,
41- uid : 'bltf6e197a18a11ec5f ' ,
41+ uid : 'entry_uid ' ,
4242 version : 2 ,
4343 locale : 'en-us' ,
4444 title : 'validation test' ,
@@ -57,6 +57,29 @@ describe('Contentstack BulkOperation test', () => {
5757 expect ( response . job_id ) . to . not . equal ( undefined ) ;
5858 } ) ;
5959
60+ it ( 'should update items to a release' , async ( ) => {
61+ const items = {
62+ release : 'release_uid' ,
63+ action : 'publish' ,
64+ locale : [ 'en-us' ] ,
65+ reference : true ,
66+ items : [
67+ '$all'
68+ ] ,
69+ } ;
70+
71+ var mock = new MockAdapter ( Axios ) ;
72+ mock . onPut ( '/bulk/release/update_items' ) . reply ( 200 , {
73+ notice : 'Your update release items to latest version request is in progress.' ,
74+ job_id : 'job_id' ,
75+ } ) ;
76+
77+ const response = await makeBulkOperation ( ) . updateItems ( { data : items , bulk_version : '2.0' } ) ;
78+ console . log ( "🚀 ~ it ~ response:" , response )
79+ expect ( response . notice ) . to . equal ( 'Your update release items to latest version request is in progress.' ) ;
80+ expect ( response . job_id ) . to . not . equal ( undefined ) ;
81+ } ) ;
82+
6083 it ( 'should publish items in bulk' , async ( ) => {
6184 const publishDetails = {
6285 entries : [
0 commit comments