File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
services/galley/test/integration/API Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1489,6 +1489,30 @@ testUpdateTeam = do
1489
1489
t <- Util. getTeam owner tid
1490
1490
liftIO $ assertEqual " teamSplashScreen" (t ^. teamSplashScreen) (fromByteString " 3-1-e1c89a56-882e-4694-bab3-c4f57803c57a" )
1491
1491
1492
+ do
1493
+ -- setting fields to `null` is the same as omitting the them from the update json record.
1494
+ -- ("name" is set because a completely empty update object is rejected.)
1495
+ doPut " {\" name\" : \" new team name\" , \" splash_screen\" : null}" 200
1496
+ t' <- Util. getTeam owner tid
1497
+ liftIO $ assertEqual " teamSplashScreen" (t' ^. teamSplashScreen) (fromByteString " 3-1-e1c89a56-882e-4694-bab3-c4f57803c57a" )
1498
+
1499
+ do
1500
+ -- setting splash screen to `"default"` won't parse as an Id.
1501
+ doPut " {\" splash_screen\" : \" default\" }" 400
1502
+
1503
+ do
1504
+ -- use the `delete` end-point!
1505
+ delete
1506
+ ( g
1507
+ . paths [" teams" , toByteString' tid, " splash_screen" ]
1508
+ . zUser owner
1509
+ . zConn " conn"
1510
+ )
1511
+ !!! const 200
1512
+ === statusCode
1513
+ t' <- Util. getTeam owner tid
1514
+ liftIO $ assertEqual " teamSplashScreen" (t' ^. teamSplashScreen) Nothing
1515
+
1492
1516
testTeamAddRemoveMemberAboveThresholdNoEvents :: HasCallStack => TestM ()
1493
1517
testTeamAddRemoveMemberAboveThresholdNoEvents = do
1494
1518
localDomain <- viewFederationDomain
You can’t perform that action at this time.
0 commit comments