Skip to content

Commit 6edea3d

Browse files
kyler-instructuresmeredith0506
authored andcommitted
spec: fixing calendar2_spec.rb should render assignments due before midnight
Change-Id: I23d4e608a6d6bf7f9f21e110d657a638dc7a6414 Reviewed-on: https://gerrit.instructure.com/18141 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Shawn Meredith <shawn@instructure.com> QA-Review: Shawn Meredith <shawn@instructure.com>
1 parent 15b2929 commit 6edea3d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

spec/selenium/calendar2_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,14 @@ def create_middle_day_assignment(name = 'new assignment')
450450

451451
context "week view" do
452452
it "should render assignments due just before midnight" do
453-
pending("fails on event count validation")
453+
num_of_days = Time.now.wday != 5 ? 1 : 2 #If it is friday, we need to add an extra day
454454
assignment_model(:course => @course,
455455
:title => "super important",
456-
:due_at => Time.zone.now.beginning_of_day + 1.day - 1.minute)
456+
:due_at => Time.zone.now.beginning_of_day + num_of_days.day - 29.minute)
457457
calendar_events = @teacher.calendar_events_for_calendar.last
458458

459459
calendar_events.title.should == "super important"
460-
@assignment.due_date.should == (Time.zone.now.beginning_of_day + 1.day - 1.minute).to_date
460+
@assignment.due_date.should == (Time.zone.now.beginning_of_day + num_of_days.day - 29.minute).to_datetime
461461

462462
get "/calendar2"
463463
wait_for_ajaximations

0 commit comments

Comments
 (0)