6 # Test that the entity capabilities plugin works as expected.
8 use Test
::More
'no_plan';
12 use_ok
'Thrasher::Test', qw(:all);
13 use_ok
'Thrasher', qw(:all);
14 use_ok
'Thrasher::Component';
15 use_ok
'Thrasher::Plugin', qw(:all);
16 use_ok
'Thrasher::Plugin::EntityCapabilities';
17 use_ok
'Thrasher::Backend::Test';
20 my $comp = logged_in_comp
;
21 $comp->send_presence_xml('test@test.com', '');
22 my $expected = clean_xml
(<<EXPECTED);
23 <presence from='test.transport'
26 node='http://developer.berlios.de/projects/thrasher/'
27 ver='vEhfNTvdI3o4kgwbVxIGfxr9S2g'
28 xmlns='http://jabber.org/protocol/caps'/>
32 is
(output
, $expected, 'caps correctly adds the capability tag for the transport');
34 $comp->send_presence_xml('test@test.com', 'juliet@' . transport_jid
);
35 $expected = clean_xml
(<<EXPECTED);
36 <presence from='test.transport'
38 type='juliet\@test.transport'>
40 node='http://developer.berlios.de/projects/thrasher/'
41 ver='vEhfNTvdI3o4kgwbVxIGfxr9S2g'
42 xmlns='http://jabber.org/protocol/caps'/>
46 is
(output
, $expected, 'caps correctly adds the capability tag for '
47 .'the virtual users');