@@ -12,31 +12,30 @@ describe('Branch api Test', () => {
12
12
client = contentstackClient ( user . authtoken )
13
13
} )
14
14
15
- it ( 'should return master branch when query is called ' , done => {
15
+ it ( 'should create Branch from staging ' , done => {
16
16
makeBranch ( )
17
- . query ( )
18
- . find ( )
17
+ . create ( { branch : devBranch } )
19
18
. then ( ( response ) => {
20
- expect ( response . items . length ) . to . be . equal ( 1 )
21
- var item = response . items [ 0 ]
22
- expect ( item . urlPath ) . to . be . equal ( `/stacks/branches/${ item . uid } ` )
23
- expect ( item . delete ) . to . not . equal ( undefined )
24
- expect ( item . fetch ) . to . not . equal ( undefined )
19
+ expect ( response . uid ) . to . be . equal ( devBranch . uid )
20
+ expect ( response . urlPath ) . to . be . equal ( `/stacks/branches/${ devBranch . uid } ` )
21
+ expect ( response . source ) . to . be . equal ( devBranch . source )
22
+ expect ( response . alias ) . to . not . equal ( undefined )
23
+ expect ( response . delete ) . to . not . equal ( undefined )
24
+ expect ( response . fetch ) . to . not . equal ( undefined )
25
25
done ( )
26
26
} )
27
27
. catch ( done )
28
28
} )
29
29
30
- it ( 'should create staging branch' , done => {
30
+ it ( 'should return master branch when query is called ' , done => {
31
31
makeBranch ( )
32
- . create ( { branch : stageBranch } )
32
+ . query ( )
33
+ . find ( )
33
34
. then ( ( response ) => {
34
- expect ( response . uid ) . to . be . equal ( stageBranch . uid )
35
- expect ( response . urlPath ) . to . be . equal ( `/stacks/branches/${ stageBranch . uid } ` )
36
- expect ( response . source ) . to . be . equal ( stageBranch . source )
37
- expect ( response . alias ) . to . not . equal ( undefined )
38
- expect ( response . delete ) . to . not . equal ( undefined )
39
- expect ( response . fetch ) . to . not . equal ( undefined )
35
+ var item = response . items [ 0 ]
36
+ expect ( item . urlPath ) . to . be . equal ( `/stacks/branches/${ item . uid } ` )
37
+ expect ( item . delete ) . to . not . equal ( undefined )
38
+ expect ( item . fetch ) . to . not . equal ( undefined )
40
39
done ( )
41
40
} )
42
41
. catch ( done )
@@ -72,21 +71,6 @@ describe('Branch api Test', () => {
72
71
. catch ( done )
73
72
} )
74
73
75
- it ( 'should create Branch from staging' , done => {
76
- makeBranch ( )
77
- . create ( { branch : devBranch } )
78
- . then ( ( response ) => {
79
- expect ( response . uid ) . to . be . equal ( devBranch . uid )
80
- expect ( response . urlPath ) . to . be . equal ( `/stacks/branches/${ devBranch . uid } ` )
81
- expect ( response . source ) . to . be . equal ( devBranch . source )
82
- expect ( response . alias ) . to . not . equal ( undefined )
83
- expect ( response . delete ) . to . not . equal ( undefined )
84
- expect ( response . fetch ) . to . not . equal ( undefined )
85
- done ( )
86
- } )
87
- . catch ( done )
88
- } )
89
-
90
74
it ( 'should query branch for specific condition' , done => {
91
75
makeBranch ( )
92
76
. query ( { query : { source : 'main' } } )
0 commit comments