Commit c0de9429 by Vedran Karačić

Merge pull request #8953 from edx/vkaracic/TNL-394-additional-testing

TNL-394: Additional testing
parents e89d8e14 f5234b1a
......@@ -7,6 +7,9 @@ define(['backbone', 'jquery', 'js/staff_debug_actions'],
var action = {location: location, locationName: locationName};
var fixture_id = 'sd_fu_' + locationName;
var fixture = $('<input>', { id: fixture_id, placeholder: "userman" });
var escapableLocationName = 'test\.\*\+\?\^\:\$\{\}\(\)\|\]\[loc';
var escapableFixture_id = 'sd_fu_' + escapableLocationName;
var escapableFixture = $('<input>', {id: escapableFixture_id, placeholder: "userman"});
describe('get_url ', function () {
it('defines url to courseware ajax entry point', function () {
......@@ -40,6 +43,11 @@ define(['backbone', 'jquery', 'js/staff_debug_actions'],
$('#' + fixture_id).val('');
$('#' + fixture_id).remove();
});
it('gets the placeholder name if the id has escapable characters', function() {
$('body').append(escapableFixture);
expect(StaffDebug.get_user('test.*+?^:${}()|][loc')).toBe('userman');
$('#' + escapableFixture_id).remove();
});
});
describe('student_grade_adjustemnts', function () {
it('makes an ajax call with the expected parameters', function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment