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
eab794b0
Commit
eab794b0
authored
Nov 12, 2015
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing test case for capa_problem
parent
379441be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+7
-1
No files found.
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
View file @
eab794b0
...
...
@@ -145,6 +145,12 @@ describe 'Problem', ->
describe
'check'
,
->
beforeEach
->
@
problem
=
new
Problem
(
$
(
'.xblock-student_view'
))
# TODO: This is broken. It does not step through very much of the
# logic. It essentially tests just the very last little bit
# of the pipeline (setting the URL string directly, as opposed
# to all of the logic which generates it. We should be setting
# @problem.inputs, and then the tests would be much more
# meaningful.
@
problem
.
answers
=
'foo=1&bar=2'
it
'log the problem_check event'
,
->
...
...
@@ -165,7 +171,7 @@ describe 'Problem', ->
always
:
(
callable
)
->
callable
()
done
:
(
callable
)
->
callable
()
@
problem
.
check
()
expect
(
Logger
.
log
).
toHaveBeenCalledWith
'problem_graded'
,
[
'foo=1&bar=2'
,
'mock grader response'
]
,
@
problem
.
id
expect
(
Logger
.
log
).
toHaveBeenCalledWith
'problem_graded'
,
{
answers
:
{
},
success
:
'correct'
}
,
@
problem
.
id
it
'submit the answer for check'
,
->
spyOn
(
$
,
'postWithPrefix'
).
andCallFake
(
url
,
answers
,
callback
)
->
...
...
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