Revision 2271,
890 bytes
checked in by alexandrecorreia, 14 years ago
(diff) |
Ticket #986 - Reimplementar interface mais leve para o IM, sem a necessidades de plugins adicionais.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[2271] | 1 | YUI().use("test", "console", function (Y) { |
---|
| 2 | Y.namespace("strophe.test"); |
---|
| 3 | var Assert = Y.Assert; |
---|
| 4 | |
---|
| 5 | Y.strophe.test.JIDTestCase = new Y.Test.Case({ |
---|
| 6 | name: "JIDs", |
---|
| 7 | |
---|
| 8 | testNormalJid: function () { |
---|
| 9 | var jid = "darcy@pemberley.lit/library"; |
---|
| 10 | |
---|
| 11 | Assert.areSame("darcy", Strophe.getNodeFromJid(jid)); |
---|
| 12 | Assert.areSame("pemberley.lit", Strophe.getDomainFromJid(jid)); |
---|
| 13 | Assert.areSame("library", Strophe.getResourceFromJid(jid)); |
---|
| 14 | Assert.areSame("darcy@pemberley.lit", |
---|
| 15 | Strophe.getBareJidFromJid(jid)); |
---|
| 16 | } |
---|
| 17 | }); |
---|
| 18 | |
---|
| 19 | Y.strophe.test.StropheSuite = new Y.Test.Suite("Strophe Suite"); |
---|
| 20 | Y.strophe.test.StropheSuite.add(Y.strophe.test.JIDTestCase); |
---|
| 21 | |
---|
| 22 | new Y.Console({newestOnTop: false}).render('#console'); |
---|
| 23 | |
---|
| 24 | Y.Test.Runner.add(Y.strophe.test.StropheSuite); |
---|
| 25 | Y.Test.Runner.run(); |
---|
| 26 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.