@@ -66,10 +66,7 @@ describe('Entry api Test', () => {
66
66
. then ( ( entry ) => {
67
67
expect ( entry . uid ) . to . be . not . equal ( null )
68
68
expect ( entry . title ) . to . be . equal ( entryFirst . title )
69
- expect ( entry . single_line ) . to . be . equal ( entryFirst . single_line )
70
69
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 )
73
70
done ( )
74
71
} )
75
72
. catch ( done )
@@ -82,9 +79,6 @@ describe('Entry api Test', () => {
82
79
expect ( entry . uid ) . to . be . not . equal ( null )
83
80
expect ( entry . title ) . to . be . equal ( entrySecond . title )
84
81
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 )
88
82
expect ( entry . tags [ 0 ] ) . to . be . equal ( entrySecond . tags [ 0 ] )
89
83
done ( )
90
84
} )
@@ -98,9 +92,6 @@ describe('Entry api Test', () => {
98
92
expect ( entry . uid ) . to . be . not . equal ( null )
99
93
expect ( entry . title ) . to . be . equal ( entryThird . title )
100
94
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 )
104
95
expect ( entry . tags [ 0 ] ) . to . be . equal ( entryThird . tags [ 0 ] )
105
96
done ( )
106
97
} )
@@ -138,10 +129,12 @@ describe('Entry api Test', () => {
138
129
139
130
it ( 'should publish Entry' , done => {
140
131
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
+ } )
145
138
. then ( ( data ) => {
146
139
expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
147
140
done ( )
@@ -151,11 +144,13 @@ describe('Entry api Test', () => {
151
144
152
145
it ( 'should publish localized Entry to locales' , done => {
153
146
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
+ } )
159
154
. then ( ( data ) => {
160
155
expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
161
156
done ( )
@@ -177,11 +172,13 @@ describe('Entry api Test', () => {
177
172
178
173
it ( 'should unpublish localized entry' , done => {
179
174
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
+ } )
185
182
. then ( ( data ) => {
186
183
expect ( data . notice ) . to . be . equal ( 'The requested action has been performed.' )
187
184
done ( )
@@ -201,8 +198,18 @@ describe('Entry api Test', () => {
201
198
} )
202
199
. catch ( done )
203
200
} )
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
+ } )
204
211
} )
205
212
206
- function makeEntry ( contentType , uid = null ) {
213
+ function makeEntry ( contentType , uid = null ) {
207
214
return client . stack ( { api_key : process . env . API_KEY } ) . contentType ( contentType ) . entry ( uid )
208
215
}
0 commit comments