@@ -14,6 +14,11 @@ describe('Contentstack apps installation test', () => {
1414 expect ( installation . update ) . to . be . equal ( undefined )
1515 expect ( installation . uninstall ) . to . be . equal ( undefined )
1616 expect ( installation . findAll ) . to . be . equal ( undefined )
17+ expect ( installation . installationData ) . to . be . equal ( undefined )
18+ expect ( installation . configuration ) . to . be . equal ( undefined )
19+ expect ( installation . setConfiguration ) . to . be . equal ( undefined )
20+ expect ( installation . serverConfig ) . to . be . equal ( undefined )
21+ expect ( installation . setServerConfig ) . to . be . equal ( undefined )
1722 done ( )
1823 } )
1924
@@ -24,6 +29,11 @@ describe('Contentstack apps installation test', () => {
2429 expect ( installation . fetch ) . to . be . equal ( undefined )
2530 expect ( installation . update ) . to . be . equal ( undefined )
2631 expect ( installation . uninstall ) . to . be . equal ( undefined )
32+ expect ( installation . installationData ) . to . be . equal ( undefined )
33+ expect ( installation . configuration ) . to . be . equal ( undefined )
34+ expect ( installation . setConfiguration ) . to . be . equal ( undefined )
35+ expect ( installation . serverConfig ) . to . be . equal ( undefined )
36+ expect ( installation . setServerConfig ) . to . be . equal ( undefined )
2737 expect ( installation . findAll ) . to . not . equal ( undefined )
2838 done ( )
2939 } )
@@ -35,6 +45,11 @@ describe('Contentstack apps installation test', () => {
3545 expect ( installation . fetch ) . to . not . equal ( undefined )
3646 expect ( installation . update ) . to . not . equal ( undefined )
3747 expect ( installation . uninstall ) . to . not . equal ( undefined )
48+ expect ( installation . installationData ) . to . not . equal ( undefined )
49+ expect ( installation . configuration ) . to . not . equal ( undefined )
50+ expect ( installation . setConfiguration ) . to . not . equal ( undefined )
51+ expect ( installation . serverConfig ) . to . not . equal ( undefined )
52+ expect ( installation . setServerConfig ) . to . not . equal ( undefined )
3853 expect ( installation . findAll ) . to . be . equal ( undefined )
3954 done ( )
4055 } )
@@ -114,6 +129,22 @@ describe('Contentstack apps installation test', () => {
114129 . catch ( done )
115130 } )
116131
132+ it ( 'Get installation installationData test' , done => {
133+ const mock = new MockAdapter ( Axios )
134+ const uid = installationMock . uid
135+ mock . onGet ( `/installations/${ uid } /installationData` ) . reply ( 200 , {
136+ data : { }
137+ } )
138+
139+ makeInstallation ( { data : { uid } } )
140+ . installationData ( )
141+ . then ( ( data ) => {
142+ expect ( data ) . to . not . equal ( null )
143+ done ( )
144+ } )
145+ . catch ( done )
146+ } )
147+
117148 it ( 'Get installation configuration test' , done => {
118149 const mock = new MockAdapter ( Axios )
119150 const uid = installationMock . uid
@@ -123,8 +154,53 @@ describe('Contentstack apps installation test', () => {
123154
124155 makeInstallation ( { data : { uid } } )
125156 . configuration ( )
126- . then ( ( configuration ) => {
127- expect ( configuration ) . to . deep . equal ( { } )
157+ . then ( ( data ) => {
158+ expect ( data ) . to . not . equal ( null )
159+ done ( )
160+ } )
161+ . catch ( done )
162+ } )
163+ it ( 'Set installation configuration test' , done => {
164+ const mock = new MockAdapter ( Axios )
165+ const uid = installationMock . uid
166+ mock . onPut ( `/installations/${ uid } /configuration` ) . reply ( 200 , {
167+ data : { }
168+ } )
169+
170+ makeInstallation ( { data : { uid } } )
171+ . setConfiguration ( { } )
172+ . then ( ( data ) => {
173+ expect ( data ) . to . not . equal ( null )
174+ done ( )
175+ } )
176+ . catch ( done )
177+ } )
178+ it ( 'Get installation server config test' , done => {
179+ const mock = new MockAdapter ( Axios )
180+ const uid = installationMock . uid
181+ mock . onGet ( `/installations/${ uid } /server-configuration` ) . reply ( 200 , {
182+ data : { }
183+ } )
184+
185+ makeInstallation ( { data : { uid } } )
186+ . serverConfig ( )
187+ . then ( ( data ) => {
188+ expect ( data ) . to . not . equal ( null )
189+ done ( )
190+ } )
191+ . catch ( done )
192+ } )
193+ it ( 'Get installation installationData test' , done => {
194+ const mock = new MockAdapter ( Axios )
195+ const uid = installationMock . uid
196+ mock . onPut ( `/installations/${ uid } /server-configuration` ) . reply ( 200 , {
197+ data : { }
198+ } )
199+
200+ makeInstallation ( { data : { uid } } )
201+ . setServerConfig ( { } )
202+ . then ( ( data ) => {
203+ expect ( data ) . to . not . equal ( null )
128204 done ( )
129205 } )
130206 . catch ( done )
0 commit comments