Commit 7abcfe53 by Jeff LaJoie

Adds in test cases for jasmine tests in course card view spec

parent 1f958f83
......@@ -234,6 +234,47 @@ define([
expect(view.$('.course-title-link').length).toEqual(0);
});
it('should show an unfulfilled expired user entitlement not allowing the changing of sessions', function() {
course.user_entitlement = {
uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
course_uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
expired_at: '2017-12-06 01:06:12',
expiration_date: '2017-12-05 01:06:12'
};
setupView(course, false);
expect(view.$('.info-expires-at').text().trim()).toContain('You can no longer select a session as of');
});
it('should show an unfulfilled user entitlement allows you to select a session', function() {
course.user_entitlement = {
uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
course_uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
expiration_date: '2017-12-05 01:06:12'
};
setupView(course, false);
expect(view.$('.info-expires-at').text().trim()).toContain('You must select a session by');
});
it('should show a fulfilled expired user entitlement does not allow the changing of sessions', function() {
course.user_entitlement = {
uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
course_uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
expired_at: '2017-12-06 01:06:12',
expiration_date: '2017-12-05 01:06:12'
};
setupView(course, true);
expect(view.$('.info-expires-at').text().trim()).toContain('You can no longer change sessions.');
});
it('should show a fulfilled user entitlement allows the changing of sessions', function() {
course.user_entitlement = {
uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
course_uuid: '99fc7414c36d4f56b37e8e30acf4c7ba',
expiration_date: '2017-12-05 01:06:12'
};
setupView(course, true);
expect(view.$('.info-expires-at').text().trim()).toContain('You can change sessions until');
});
});
}
);
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