@@ -42,7 +42,10 @@ describe("schema commit", function () {
42
42
await run ( `schema commit --secret "secret"` , container ) ;
43
43
44
44
expect ( fetch ) . to . have . been . calledWith (
45
- buildUrl ( "/schema/1/staged/status" , { diff : "true" , color : "ansi" } ) ,
45
+ buildUrl ( "/schema/1/staged/status" , {
46
+ format : "semantic" ,
47
+ color : "ansi" ,
48
+ } ) ,
46
49
{ ...commonFetchParams , method : "GET" } ,
47
50
) ;
48
51
expect ( fetch ) . to . have . been . calledWith (
@@ -62,10 +65,10 @@ describe("schema commit", function () {
62
65
await run ( `schema commit --secret "secret" --no-input` , container ) ;
63
66
64
67
expect ( fetch ) . to . have . been . calledOnce ;
65
- expect ( fetch ) . to . have . been . calledWith (
66
- buildUrl ( "/schema/1/staged/commit" , { force : "true" } ) ,
67
- { ... commonFetchParams , method : "POST" } ,
68
- ) ;
68
+ expect ( fetch ) . to . have . been . calledWith ( buildUrl ( "/schema/1/staged/commit" ) , {
69
+ ... commonFetchParams ,
70
+ method : "POST" ,
71
+ } ) ;
69
72
expect ( logger . stdout ) . to . have . been . calledWith ( "Schema has been committed" ) ;
70
73
expect ( logger . stderr ) . to . not . have . been . called ;
71
74
expect ( confirm ) . to . not . have . been . called ;
@@ -81,7 +84,10 @@ describe("schema commit", function () {
81
84
expect ( error ) . to . have . property ( "code" , 1 ) ;
82
85
expect ( fetch ) . to . have . been . calledOnce ;
83
86
expect ( fetch ) . to . have . been . calledWith (
84
- buildUrl ( "/schema/1/staged/status" , { diff : "true" , color : "ansi" } ) ,
87
+ buildUrl ( "/schema/1/staged/status" , {
88
+ format : "semantic" ,
89
+ color : "ansi" ,
90
+ } ) ,
85
91
{ ...commonFetchParams , method : "GET" } ,
86
92
) ;
87
93
expect ( logger . stdout ) . to . not . have . been . called ;
@@ -100,7 +106,10 @@ describe("schema commit", function () {
100
106
expect ( error ) . to . have . property ( "code" , 1 ) ;
101
107
expect ( fetch ) . to . have . been . calledOnce ;
102
108
expect ( fetch ) . to . have . been . calledWith (
103
- buildUrl ( "/schema/1/staged/status" , { diff : "true" , color : "ansi" } ) ,
109
+ buildUrl ( "/schema/1/staged/status" , {
110
+ format : "semantic" ,
111
+ color : "ansi" ,
112
+ } ) ,
104
113
{ ...commonFetchParams , method : "GET" } ,
105
114
) ;
106
115
expect ( logger . stdout ) . to . have . been . calledWith ( diff ) ;
@@ -127,7 +136,10 @@ describe("schema commit", function () {
127
136
128
137
expect ( fetch ) . to . have . been . calledOnce ;
129
138
expect ( fetch ) . to . have . been . calledWith (
130
- buildUrl ( "/schema/1/staged/status" , { diff : "true" , color : "ansi" } ) ,
139
+ buildUrl ( "/schema/1/staged/status" , {
140
+ format : "semantic" ,
141
+ color : "ansi" ,
142
+ } ) ,
131
143
{ ...commonFetchParams , method : "GET" } ,
132
144
) ;
133
145
expect ( logger . stdout ) . to . have . been . calledWith ( "Commit cancelled" ) ;
0 commit comments