Add today time info
This commit is contained in:
12
spec/entity_spec.cr
Normal file
12
spec/entity_spec.cr
Normal 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
|
@ -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
|
||||
|
Reference in New Issue
Block a user