Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f7683833
Commit
f7683833
authored
Apr 29, 2014
by
Jim Abramson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3526 from edx/jsa/jasmine-fix
crude fix for intermittent jasmine test failures
parents
d78dd92c
03977a46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
common/static/coffee/spec/discussion/view/response_comment_view_spec.coffee
+4
-2
No files found.
common/static/coffee/spec/discussion/view/response_comment_view_spec.coffee
View file @
f7683833
...
...
@@ -141,8 +141,6 @@ describe 'ResponseCommentView', ->
spyOn
(
@
view
,
'cancelEdit'
)
spyOn
(
$
,
"ajax"
).
andCallFake
(
(
params
)
=>
expect
(
params
.
url
.
_parts
.
path
).
toEqual
(
"/courses/edX/999/test/discussion/comments/01234567/update"
)
expect
(
params
.
data
.
body
).
toEqual
(
@
updatedBody
)
if
@
ajaxSucceed
params
.
success
()
else
...
...
@@ -154,6 +152,8 @@ describe 'ResponseCommentView', ->
@
ajaxSucceed
=
true
@
view
.
update
(
makeEventSpy
())
expect
(
$
.
ajax
).
toHaveBeenCalled
()
expect
(
$
.
ajax
.
mostRecentCall
.
args
[
0
].
url
.
_parts
.
path
).
toEqual
(
'/courses/edX/999/test/discussion/comments/01234567/update'
)
expect
(
$
.
ajax
.
mostRecentCall
.
args
[
0
].
data
.
body
).
toEqual
(
@
updatedBody
)
expect
(
@
view
.
model
.
get
(
"body"
)).
toEqual
(
@
updatedBody
)
expect
(
@
view
.
cancelEdit
).
toHaveBeenCalled
()
...
...
@@ -162,6 +162,8 @@ describe 'ResponseCommentView', ->
@
ajaxSucceed
=
false
@
view
.
update
(
makeEventSpy
())
expect
(
$
.
ajax
).
toHaveBeenCalled
()
expect
(
$
.
ajax
.
mostRecentCall
.
args
[
0
].
url
.
_parts
.
path
).
toEqual
(
'/courses/edX/999/test/discussion/comments/01234567/update'
)
expect
(
$
.
ajax
.
mostRecentCall
.
args
[
0
].
data
.
body
).
toEqual
(
@
updatedBody
)
expect
(
@
view
.
model
.
get
(
"body"
)).
toEqual
(
originalBody
)
expect
(
@
view
.
cancelEdit
).
not
.
toHaveBeenCalled
()
expect
(
@
view
.
$
(
".edit-comment-form-errors *"
).
length
).
toEqual
(
1
)
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