Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
bc0e200c
Commit
bc0e200c
authored
Aug 24, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
4bc2b722
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
spec/ChatRoomSpec.js
spec/ChatRoomSpec.js
+0
-9
No files found.
spec/ChatRoomSpec.js
View file @
bc0e200c
...
@@ -135,7 +135,6 @@
...
@@ -135,7 +135,6 @@
.
c
(
'
not-authorized
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
not-authorized
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
renderPasswordForm
'
).
andCallThrough
();
spyOn
(
view
,
'
renderPasswordForm
'
).
andCallThrough
();
runs
(
function
()
{
runs
(
function
()
{
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
...
@@ -159,7 +158,6 @@
...
@@ -159,7 +158,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
auth
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
auth
'
})
.
c
(
'
registration-required
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
registration-required
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
...
@@ -175,7 +173,6 @@
...
@@ -175,7 +173,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
auth
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
auth
'
})
.
c
(
'
forbidden
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
forbidden
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
...
@@ -191,7 +188,6 @@
...
@@ -191,7 +188,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
modify
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
modify
'
})
.
c
(
'
jid-malformed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
jid-malformed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
...
@@ -207,7 +203,6 @@
...
@@ -207,7 +203,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
not-allowed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
not-allowed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
...
@@ -223,7 +218,6 @@
...
@@ -223,7 +218,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
not-acceptable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
not-acceptable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
...
@@ -239,7 +233,6 @@
...
@@ -239,7 +233,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
conflict
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
conflict
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
...
@@ -255,7 +248,6 @@
...
@@ -255,7 +248,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
item-not-found
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
item-not-found
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
...
@@ -271,7 +263,6 @@
...
@@ -271,7 +263,6 @@
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
error
'
).
attrs
({
by
:
'
coven@chat.shakespeare.lit
'
,
type
:
'
cancel
'
})
.
c
(
'
service-unavailable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
service-unavailable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment