@@ -66,10 +66,7 @@ describe('Entry api Test', () => {
6666 . then ( ( entry ) => {
6767 expect ( entry . uid ) . to . be . not . equal ( null )
6868 expect ( entry . title ) . to . be . equal ( entryFirst . title )
69- expect ( entry . single_line ) . to . be . equal ( entryFirst . single_line )
7069 expect ( entry . url ) . to . be . equal ( `/${ entryFirst . title . toLowerCase ( ) . replace ( / / g, '-' ) } ` )
71- expect ( entry . multi_line ) . to . be . equal ( entryFirst . multi_line )
72- expect ( entry . markdown ) . to . be . equal ( entryFirst . markdown )
7370 done ( )
7471 } )
7572 . catch ( done )
@@ -82,9 +79,6 @@ describe('Entry api Test', () => {
8279 expect ( entry . uid ) . to . be . not . equal ( null )
8380 expect ( entry . title ) . to . be . equal ( entrySecond . title )
8481 expect ( entry . url ) . to . be . equal ( `/${ entrySecond . title . toLowerCase ( ) . replace ( / / g, '-' ) } ` )
85- expect ( entry . single_line ) . to . be . equal ( entrySecond . single_line )
86- expect ( entry . multi_line ) . to . be . equal ( entrySecond . multi_line )
87- expect ( entry . markdown ) . to . be . equal ( entrySecond . markdown )
8882 expect ( entry . tags [ 0 ] ) . to . be . equal ( entrySecond . tags [ 0 ] )
8983 done ( )
9084 } )
@@ -98,9 +92,6 @@ describe('Entry api Test', () => {
9892 expect ( entry . uid ) . to . be . not . equal ( null )
9993 expect ( entry . title ) . to . be . equal ( entryThird . title )
10094 expect ( entry . url ) . to . be . equal ( `/${ entryThird . title . toLowerCase ( ) . replace ( / / g, '-' ) } ` )
101- expect ( entry . single_line ) . to . be . equal ( entryThird . single_line )
102- expect ( entry . multi_line ) . to . be . equal ( entryThird . multi_line )
103- expect ( entry . markdown ) . to . be . equal ( entryThird . markdown )
10495 expect ( entry . tags [ 0 ] ) . to . be . equal ( entryThird . tags [ 0 ] )
10596 done ( )
10697 } )
@@ -138,10 +129,12 @@ describe('Entry api Test', () => {
138129
139130 it ( 'should publish Entry' , done => {
140131 makeEntry ( singlepageCT . content_type . uid , entryUTD )
141- . publish ( { publishDetails : {
142- locales : [ 'en-us' ] ,
143- environments : [ 'development' ]
144- } } )
132+ . publish ( {
133+ publishDetails : {
134+ locales : [ 'en-us' ] ,
135+ environments : [ 'development' ]
136+ }
137+ } )
145138 . then ( ( data ) => {
146139 expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
147140 done ( )
@@ -151,11 +144,13 @@ describe('Entry api Test', () => {
151144
152145 it ( 'should publish localized Entry to locales' , done => {
153146 makeEntry ( singlepageCT . content_type . uid , entryUTD )
154- . publish ( { publishDetails : {
155- locales : [ 'hi-in' , 'en-at' ] ,
156- environments : [ 'development' ]
157- } ,
158- locale : 'en-at' } )
147+ . publish ( {
148+ publishDetails : {
149+ locales : [ 'hi-in' , 'en-at' ] ,
150+ environments : [ 'development' ]
151+ } ,
152+ locale : 'en-at'
153+ } )
159154 . then ( ( data ) => {
160155 expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
161156 done ( )
@@ -177,11 +172,13 @@ describe('Entry api Test', () => {
177172
178173 it ( 'should unpublish localized entry' , done => {
179174 makeEntry ( singlepageCT . content_type . uid , entryUTD )
180- . unpublish ( { publishDetails : {
181- locales : [ 'hi-in' , 'en-at' ] ,
182- environments : [ 'development' ]
183- } ,
184- locale : 'en-at' } )
175+ . unpublish ( {
176+ publishDetails : {
177+ locales : [ 'hi-in' , 'en-at' ] ,
178+ environments : [ 'development' ]
179+ } ,
180+ locale : 'en-at'
181+ } )
185182 . then ( ( data ) => {
186183 expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
187184 done ( )
@@ -201,8 +198,18 @@ describe('Entry api Test', () => {
201198 } )
202199 . catch ( done )
203200 } )
201+
202+ it ( 'should get entry variants of the given Entry uid' , done => {
203+ makeEntry ( singlepageCT . content_type . uid , entryUTD ) . includeVariants ( 'true' , 'variants_uid' )
204+ . then ( ( response ) => {
205+ expect ( response . uid ) . to . be . not . equal ( null )
206+ expect ( response . _variants ) . to . be . not . equal ( null )
207+ done ( )
208+ } )
209+ . catch ( done )
210+ } )
204211} )
205212
206- function makeEntry ( contentType , uid = null ) {
213+ function makeEntry ( contentType , uid = null ) {
207214 return client . stack ( { api_key : process . env . API_KEY } ) . contentType ( contentType ) . entry ( uid )
208215}
0 commit comments