mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 04:22:13 +00:00
core: tests for operators api, CLI command to update operators (#5226)
This commit is contained in:
1 parent
bab63d8f27
commit
49d1b26bba
6 files changed
+98
-15
No files matched your search
@@ -376,6 +376,16 @@ userName :: TestCC -> IO [Char]
|
||||
userName (TestCC ChatController {currentUser} _ _ _ _ _) =
|
||||
maybe "no current user" (\User {localDisplayName} -> T.unpack localDisplayName) <$> readTVarIO currentUser
|
||||
|
||||
testChat :: HasCallStack => Profile -> (HasCallStack => TestCC -> IO ()) -> FilePath -> IO ()
|
||||
testChat = testChatCfgOpts testCfg testOpts
|
||||
|
||||
testChatCfgOpts :: HasCallStack => ChatConfig -> ChatOpts -> Profile -> (HasCallStack => TestCC -> IO ()) -> FilePath -> IO ()
|
||||
testChatCfgOpts cfg opts p test = testChatN cfg opts [p] test_
|
||||
where
|
||||
test_ :: HasCallStack => [TestCC] -> IO ()
|
||||
test_ [tc] = test tc
|
||||
test_ _ = error "expected 1 chat client"
|
||||
|
||||
testChat2 :: HasCallStack => Profile -> Profile -> (HasCallStack => TestCC -> TestCC -> IO ()) -> FilePath -> IO ()
|
||||
testChat2 = testChatCfgOpts2 testCfg testOpts
|
||||
|
||||
|
||||
Reference in new issue
Block a user