Skip to content

Commit

Permalink
fix unit tests (resource attribute)
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Jan 9, 2012
1 parent a0905a1 commit 015c0d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/ts_test_jabber.erl
Expand Up @@ -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{}),
Expand Down

0 comments on commit 015c0d7

Please sign in to comment.