@@ -263,6 +263,41 @@ func Test_AppManifest_AppSettings_SiwsLinks(t *testing.T) {
263263 }
264264}
265265
266+ func Test_AppManifest_AppSettings_IsMCPEnabled (t * testing.T ) {
267+ truth := true
268+ tests := map [string ]struct {
269+ settings * AppSettings
270+ expectedMCPValue * bool
271+ expectedJSON string
272+ }{
273+ "undefined setting has no value" : {
274+ settings : & AppSettings {},
275+ expectedMCPValue : nil ,
276+ expectedJSON : `{}` ,
277+ },
278+ "defined setting has a value" : {
279+ settings : & AppSettings {IsMCPEnabled : & truth },
280+ expectedMCPValue : & truth ,
281+ expectedJSON : `{"is_mcp_enabled":true}` ,
282+ },
283+ }
284+ for name , tc := range tests {
285+ t .Run (name , func (t * testing.T ) {
286+ manifest := AppManifest {
287+ Settings : tc .settings ,
288+ }
289+ if tc .settings != nil {
290+ actualJSON , err := json .Marshal (tc .settings )
291+ require .NoError (t , err )
292+ assert .Equal (t , tc .expectedJSON , string (actualJSON ))
293+ assert .Equal (t , tc .expectedMCPValue , manifest .Settings .IsMCPEnabled )
294+ } else {
295+ assert .Nil (t , manifest .Settings )
296+ }
297+ })
298+ }
299+ }
300+
266301func Test_AppManifest_AppSettings_IncomingWebhooks (t * testing.T ) {
267302 falsity := false
268303 expectedIncomingWebhooks := IncomingWebhooks {
0 commit comments