Commit 47979e5b by Diana Huang

Add tests for the enrollment_interface

parent fc468bf6
......@@ -260,7 +260,10 @@
exports: 'NotificationView',
deps: ['backbone', 'jquery', 'underscore']
},
'js/student_account/enrollment_interface': {
exports: 'js/student_account/enrollment_interface',
deps: ['jquery', 'underscore', 'gettext']
},
// Student account registration/login
// Loaded explicitly until these are converted to RequireJS
'js/student_account/views/FormView': {
......@@ -310,7 +313,7 @@
'js/student_account/views/RegisterView',
'underscore.string'
]
},
}
},
});
......@@ -327,6 +330,7 @@
'lms/include/js/spec/student_account/login_spec.js',
'lms/include/js/spec/student_account/register_spec.js',
'lms/include/js/spec/student_account/password_reset_spec.js',
'lms/include/js/spec/student_account/enrollment_interface_spec.js',
'lms/include/js/spec/student_profile/profile.js',
]);
......
define(['js/common_helpers/template_helpers', 'js/student_account/views/AccessView'],
function(TemplateHelpers) {
function(TemplateHelpers, AccessView) {
describe('edx.student.account.AccessView', function() {
'use strict';
......
define(['js/common_helpers/template_helpers', 'js/student_account/enrollment_interface'],
function(TemplateHelpers) {
function(TemplateHelpers, EnrollmentInterface) {
describe("edx.student.account.EnrollmentInterface", function() {
'use strict';
it("find course modes using modeInArray ", function() {
var course_modes = [
{
slug: 'honor'
},
{
slug: 'professional'
}
];
],
expect(EnrollmentInterface.modeInArray('professional')).toBe(true);
expect(EnrollmentInterface.modeInArray('audit')).toBe(false);
});
});
}
......
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