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
3dfa36c2
Commit
3dfa36c2
authored
Oct 30, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests after small markup change
parent
6d356817
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
spec/chatroom.js
spec/chatroom.js
+8
-8
No files found.
spec/chatroom.js
View file @
3dfa36c2
...
@@ -589,7 +589,7 @@
...
@@ -589,7 +589,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the user has been banned
"
,
function
()
{
it
(
"
will show an error message if the user has been banned
"
,
function
()
{
...
@@ -604,7 +604,7 @@
...
@@ -604,7 +604,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if no nickname was specified for the user
"
,
function
()
{
it
(
"
will show an error message if no nickname was specified for the user
"
,
function
()
{
...
@@ -619,7 +619,7 @@
...
@@ -619,7 +619,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the user is not allowed to have created the room
"
,
function
()
{
it
(
"
will show an error message if the user is not allowed to have created the room
"
,
function
()
{
...
@@ -634,7 +634,7 @@
...
@@ -634,7 +634,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the user's nickname doesn't conform to room policy
"
,
function
()
{
it
(
"
will show an error message if the user's nickname doesn't conform to room policy
"
,
function
()
{
...
@@ -649,7 +649,7 @@
...
@@ -649,7 +649,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the user's nickname is already taken
"
,
function
()
{
it
(
"
will show an error message if the user's nickname is already taken
"
,
function
()
{
...
@@ -664,7 +664,7 @@
...
@@ -664,7 +664,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the room doesn't yet exist
"
,
function
()
{
it
(
"
will show an error message if the room doesn't yet exist
"
,
function
()
{
...
@@ -679,7 +679,7 @@
...
@@ -679,7 +679,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
}.
bind
(
converse
));
}.
bind
(
converse
));
it
(
"
will show an error message if the room has reached it's maximum number of occupants
"
,
function
()
{
it
(
"
will show an error message if the room has reached it's maximum number of occupants
"
,
function
()
{
...
@@ -694,7 +694,7 @@
...
@@ -694,7 +694,7 @@
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
var
view
=
this
.
chatboxviews
.
get
(
'
problematic@muc.localhost
'
);
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
showErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
expect
(
view
.
$el
.
find
(
'
.chatroom-body p
:last
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
}.
bind
(
converse
));
}.
bind
(
converse
));
}.
bind
(
converse
));
}.
bind
(
converse
));
}.
bind
(
converse
,
mock
,
test_utils
));
}.
bind
(
converse
,
mock
,
test_utils
));
...
...
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