Add tests for the enrollment_interface
This commit is contained in:
@@ -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',
|
||||
]);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
define(['js/common_helpers/template_helpers', 'js/student_account/views/AccessView'],
|
||||
function(TemplateHelpers) {
|
||||
function(TemplateHelpers, AccessView) {
|
||||
describe('edx.student.account.AccessView', function() {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
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);
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user