module Test.FeatureFlags.GuestLinks where

import Test.FeatureFlags.Util
import Testlib.Prelude

testConversationGuestLinks :: (HasCallStack) => FeatureTable -> APIAccess -> App ()
testConversationGuestLinks :: HasCallStack => FeatureTable -> APIAccess -> App ()
testConversationGuestLinks FeatureTable
table APIAccess
access =
  String -> FeatureTests
mkFeatureTests String
"conversationGuestLinks"
    FeatureTests -> (FeatureTests -> FeatureTests) -> FeatureTests
forall a b. a -> (a -> b) -> b
& Value -> FeatureTests -> FeatureTests
addUpdate Value
disabled
    FeatureTests -> (FeatureTests -> FeatureTests) -> FeatureTests
forall a b. a -> (a -> b) -> b
& Value -> FeatureTests -> FeatureTests
addUpdate Value
enabled
    FeatureTests -> (FeatureTests -> FeatureTests) -> FeatureTests
forall a b. a -> (a -> b) -> b
& FeatureTable -> FeatureTests -> FeatureTests
setTable FeatureTable
table
    FeatureTests -> (FeatureTests -> App ()) -> App ()
forall a b. a -> (a -> b) -> b
& Domain -> APIAccess -> FeatureTests -> App ()
forall domain.
(HasCallStack, MakesValue domain) =>
domain -> APIAccess -> FeatureTests -> App ()
runFeatureTests Domain
OwnDomain APIAccess
access

testPatchGuestLinks :: (HasCallStack) => FeatureTable -> App ()
testPatchGuestLinks :: HasCallStack => FeatureTable -> App ()
testPatchGuestLinks FeatureTable
table = FeatureTable -> Domain -> String -> Value -> App ()
forall domain.
(HasCallStack, MakesValue domain) =>
FeatureTable -> domain -> String -> Value -> App ()
checkPatchWithTable FeatureTable
table Domain
OwnDomain String
"conversationGuestLinks" Value
disabled

testConversationGuestLinksReadOnly :: (HasCallStack) => APIAccess -> App ()
testConversationGuestLinksReadOnly :: HasCallStack => APIAccess -> App ()
testConversationGuestLinksReadOnly APIAccess
access =
  Domain -> APIAccess -> FeatureTests -> App ()
forall domain.
(HasCallStack, MakesValue domain) =>
domain -> APIAccess -> FeatureTests -> App ()
runFeatureTestsReadOnly Domain
OwnDomain APIAccess
access
    (FeatureTests -> App ()) -> FeatureTests -> App ()
forall a b. (a -> b) -> a -> b
$ String -> FeatureTests
mkFeatureTests String
"conversationGuestLinks"
    FeatureTests -> (FeatureTests -> FeatureTests) -> FeatureTests
forall a b. a -> (a -> b) -> b
& Value -> FeatureTests -> FeatureTests
addUpdate Value
disabled
    FeatureTests -> (FeatureTests -> FeatureTests) -> FeatureTests
forall a b. a -> (a -> b) -> b
& Value -> FeatureTests -> FeatureTests
addUpdate Value
enabled

testPatchGuestLinksReadOnly :: (HasCallStack) => App ()
testPatchGuestLinksReadOnly :: HasCallStack => App ()
testPatchGuestLinksReadOnly = Domain -> String -> Value -> App ()
forall domain.
(HasCallStack, MakesValue domain) =>
domain -> String -> Value -> App ()
checkPatchReadOnly Domain
OwnDomain String
"conversationGuestLinks" Value
disabled