[tests] Minor test fixes

This commit is contained in:
Nemo 2021-05-11 14:56:24 +05:30
parent 2e4dcfa752
commit cfe5e60ecf
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ require "./spec_helper"
describe Suntime do describe Suntime do
it "should work for bangalore" do it "should work for bangalore" do
bangalore_tz = Time::Location.load("Asia/Kolkata") bangalore_tz = Time::Location.load("Asia/Kolkata")
tt = Time.local(location: bangalore_tz) tt = Time.local(2020, 5, 23, 14, 0, 0, location: bangalore_tz)
t = Suntime::Suntime.new(12.955800, 77.620979, tt) t = Suntime::Suntime.new(12.955800, 77.620979, tt)
a = t.sunrise a = t.sunrise
@ -12,7 +12,7 @@ describe Suntime do
a.day.should eq(23) a.day.should eq(23)
a.hour.should eq(5) a.hour.should eq(5)
a.minute.should eq(52) a.minute.should eq(52)
a.second.should eq(29) a.second.should eq(30)
a.offset.should eq(5.5 * 60 * 60) a.offset.should eq(5.5 * 60 * 60)
a.location.should eq bangalore_tz a.location.should eq bangalore_tz
@ -22,7 +22,7 @@ describe Suntime do
b.day.should eq(23) b.day.should eq(23)
b.hour.should eq(18) b.hour.should eq(18)
b.minute.should eq(39) b.minute.should eq(39)
b.second.should eq(28) b.second.should eq(26)
b.offset.should eq(5.5 * 60 * 60) b.offset.should eq(5.5 * 60 * 60)
b.location.should eq bangalore_tz b.location.should eq bangalore_tz
end end