Calc work hours
This commit is contained in:
14
spec/data/work-dates.json
Normal file
14
spec/data/work-dates.json
Normal file
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"date": "2019-01-01",
|
||||
"hours": 10
|
||||
},
|
||||
{
|
||||
"date": "2019-01-02",
|
||||
"hours": 6
|
||||
},
|
||||
{
|
||||
"date": "2019-01-03",
|
||||
"hours": 4
|
||||
}
|
||||
]
|
@ -1,9 +1,8 @@
|
||||
require "./spec_helper"
|
||||
|
||||
describe Dayoff do
|
||||
# TODO: Write tests
|
||||
|
||||
it "works" do
|
||||
false.should eq(true)
|
||||
it "can calc work hours" do
|
||||
app = Dayoff::App.new("./spec/data/work-dates.json")
|
||||
app.get_work_hours.should eq 20
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user