Add today time info

This commit is contained in:
2019-11-13 22:56:20 +03:00
parent a505b23bb1
commit b40e3827b4
7 changed files with 97 additions and 24 deletions

12
spec/entity_spec.cr Normal file
View File

@ -0,0 +1,12 @@
require "./spec_helper"
module Dayoff::Test
extend self
describe "can check same date" do
planned_date = PlannedDate.new(t(1, 12), 8)
date = t(1, 20)
res = planned_date.same_date? date
res.should be_true
end
end

View File

@ -94,5 +94,11 @@ module Dayoff::Test
prof.finish finish_time
end
end
it "can calc diff on concrete date" do
prof = create_profile
span = prof.date_status d(1)
span.total_hours.should eq -2
end
end
end