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
304b2757
Commit
304b2757
authored
Aug 20, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests. removeRoom method doesn't exist anymore
parent
fc4bec1e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
10 deletions
+0
-10
mock.js
mock.js
+0
-1
spec/ChatRoomSpec.js
spec/ChatRoomSpec.js
+0
-9
No files found.
mock.js
View file @
304b2757
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
'
listRooms
'
:
function
()
{},
'
listRooms
'
:
function
()
{},
'
join
'
:
function
()
{},
'
join
'
:
function
()
{},
'
leave
'
:
function
()
{},
'
leave
'
:
function
()
{},
'
removeRoom
'
:
function
()
{},
'
rooms
'
:
{}
'
rooms
'
:
{}
},
},
'
jid
'
:
'
dummy@localhost
'
,
'
jid
'
:
'
dummy@localhost
'
,
...
...
spec/ChatRoomSpec.js
View file @
304b2757
...
@@ -143,7 +143,6 @@
...
@@ -143,7 +143,6 @@
waits
(
250
);
waits
(
250
);
runs
(
function
()
{
runs
(
function
()
{
var
$chat_body
=
view
.
$el
.
find
(
'
.chat-body
'
);
var
$chat_body
=
view
.
$el
.
find
(
'
.chat-body
'
);
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
renderPasswordForm
).
toHaveBeenCalled
();
expect
(
view
.
renderPasswordForm
).
toHaveBeenCalled
();
expect
(
$chat_body
.
find
(
'
form.chatroom-form
'
).
length
).
toBe
(
1
);
expect
(
$chat_body
.
find
(
'
form.chatroom-form
'
).
length
).
toBe
(
1
);
expect
(
$chat_body
.
find
(
'
legend
'
).
text
()).
toBe
(
'
This chatroom requires a password
'
);
expect
(
$chat_body
.
find
(
'
legend
'
).
text
()).
toBe
(
'
This chatroom requires a password
'
);
...
@@ -163,7 +162,6 @@
...
@@ -163,7 +162,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
'
);
},
converse
));
},
converse
));
...
@@ -180,7 +178,6 @@
...
@@ -180,7 +178,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
'
);
},
converse
));
},
converse
));
...
@@ -197,7 +194,6 @@
...
@@ -197,7 +194,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
'
);
},
converse
));
},
converse
));
...
@@ -214,7 +210,6 @@
...
@@ -214,7 +210,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
'
);
},
converse
));
},
converse
));
...
@@ -231,7 +226,6 @@
...
@@ -231,7 +226,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
"
);
},
converse
));
},
converse
));
...
@@ -248,7 +242,6 @@
...
@@ -248,7 +242,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
"
);
},
converse
));
},
converse
));
...
@@ -265,7 +258,6 @@
...
@@ -265,7 +258,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
"
);
},
converse
));
},
converse
));
...
@@ -282,7 +274,6 @@
...
@@ -282,7 +274,6 @@
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
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
"
);
},
converse
));
},
converse
));
},
converse
));
},
converse
));
...
...
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