Skip to content

Commit

Permalink
Tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Di Milia committed Jun 28, 2016
1 parent 75d6f86 commit c7d1c3a
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions static/js/util/courseList_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,44 +99,18 @@ describe('courseList functions', () => {
}, moment(today)), "33%");
});

it("is an enrolled course with no verification date", () => {
assert.equal(renderCourseStatusDisplay({
status: STATUS_ENROLLED_NOT_VERIFIED,
runs: []
}, moment(today)), "");
});

it("is an enrolled course with a verification date of tomorrow", () => {
it("is an enrolled course but not verified", () => {
assert.equal(
renderCourseStatusDisplay({
status: STATUS_ENROLLED_NOT_VERIFIED,
runs: [{
verification_date: tomorrow,
title: "Run title"
}],
}, moment(today)),
"UPGRADE TO VERIFIED for Run title"
);
});

it("is an enrolled course with a verification date of today", () => {
assert.equal(renderCourseStatusDisplay({
status: STATUS_ENROLLED_NOT_VERIFIED,
runs: [{
verification_date: today
}]
}, moment(today)), "");
});

it("is an enrolled course with a verification date of yesterday", () => {
assert.equal(renderCourseStatusDisplay({
status: STATUS_ENROLLED_NOT_VERIFIED,
runs: [{
verification_date: yesterday
}]
}, moment(today)), "");
});

it("is an offered course with no enrollment start date", () => {
assert.equal(renderCourseStatusDisplay({
status: STATUS_OFFERED_NOT_ENROLLED,
Expand Down Expand Up @@ -224,7 +198,7 @@ describe('courseList functions', () => {

describe("makeRunStatusDisplay", () => {
it('shows Course passed when a course is passed', () => {
assert.equal("Passed", makeRunStatusDisplay({
assert.equal("Passed", makeRunStatusDisplay({
status: STATUS_PASSED,
runs: []
}));
Expand Down

0 comments on commit c7d1c3a

Please sign in to comment.