mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Add test that trigger get_only_item in pubsub
This commit is contained in:
parent
51bf552c3f
commit
aa0f110afe
@ -55,6 +55,7 @@ single_cases() ->
|
||||
single_test(test_delete_item),
|
||||
single_test(test_purge),
|
||||
single_test(test_subscribe),
|
||||
single_test(test_subscribe_max_item_1),
|
||||
single_test(test_unsubscribe)]}.
|
||||
|
||||
test_features(Config) ->
|
||||
@ -163,6 +164,16 @@ test_subscribe(Config) ->
|
||||
delete_node(Config, Node),
|
||||
disconnect(Config).
|
||||
|
||||
test_subscribe_max_item_1(Config) ->
|
||||
DefaultNodeConfig = get_default_node_config(Config),
|
||||
CustomNodeConfig = set_opts(DefaultNodeConfig,
|
||||
[{max_items, 1}]),
|
||||
Node = create_node(Config, <<>>, CustomNodeConfig),
|
||||
#ps_subscription{type = subscribed} = subscribe_node(Config, Node),
|
||||
[#ps_subscription{node = Node}] = get_subscriptions(Config),
|
||||
delete_node(Config, Node),
|
||||
disconnect(Config).
|
||||
|
||||
test_unsubscribe(Config) ->
|
||||
Node = create_node(Config, <<>>),
|
||||
subscribe_node(Config, Node),
|
||||
|
Loading…
Reference in New Issue
Block a user