Permalink
Browse files

fix unit tests (resource attribute)

  • Loading branch information...
1 parent a0905a1 commit 015c0d74ac70bba70b34dd324dfbaadccbc1d485 @nniclausse nniclausse committed Jan 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/test/ts_test_jabber.erl
@@ -100,15 +100,15 @@ add_dynparams2_test()->
get_message_test()->
erase(xmpp_user_id),
ts_msg_server:start(),
- Session = #jabber{id=0,username="foo",type='auth_set_plain',passwd="bar",domain={domain,"localdomain"}},
+ Session = #jabber{id=0,username="foo",type='auth_set_plain',passwd="bar",domain={domain,"localdomain"},resource="tsung"},
Req=ts_jabber:add_dynparams(false,[],Session,"localhost"),
RepOK={<<"<iq id='1' type='set' ><query xmlns='jabber:iq:auth'><username>foo4</username><resource>tsung</resource><password>bar4</password></query></iq>" >>,undefined},
Rep=ts_jabber:get_message(Req,#state_rcv{}),
?assertEqual(RepOK,Rep ).
get_message2_test()->
erase(xmpp_user_id),
- Session = #jabber{id=user_defined,username="foo",type='auth_set_plain',passwd="bar",domain={domain,"localdomain"}},
+ Session = #jabber{id=user_defined,username="foo",type='auth_set_plain',passwd="bar",domain={domain,"localdomain"},resource="tsung"},
Req=ts_jabber:add_dynparams(false,[],Session,"localhost"),
RepOK={<<"<iq id='2' type='set' ><query xmlns='jabber:iq:auth'><username>foo</username><resource>tsung</resource><password>bar</password></query></iq>" >>,undefined},
Rep=ts_jabber:get_message(Req,#state_rcv{}),

0 comments on commit 015c0d7

Please sign in to comment.