Skip to content

Commit

Permalink
replace old testsuite for check time
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 5, 2020
1 parent c880f3e commit b08bfe8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 52 deletions.
17 changes: 17 additions & 0 deletions timezone/test/Timezone_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,21 @@
expect(subject.CheckDate("1", "1", "2033")).to eq false
end
end

describe "#CheckTime" do
it "returns true if time is valid" do
expect(subject.CheckTime("1", "1", "1")).to eq true
expect(subject.CheckTime("23", "02", "02")).to eq true
expect(subject.CheckTime("0", "0", "0")).to eq true
end

it "returns false if invalid time is passed" do
expect(subject.CheckTime("0", "1", "2000")).to eq false
expect(subject.CheckTime("29", "2", "2")).to eq false
expect(subject.CheckTime("24", "0", "0")).to eq false
expect(subject.CheckTime("", "13", "20")).to eq false
expect(subject.CheckTime("1", "13", "string")).to eq false
expect(subject.CheckTime(nil, nil, "20")).to eq false
end
end
end
Empty file.
7 changes: 0 additions & 7 deletions timezone/testsuite/tests/CheckTime.out

This file was deleted.

45 changes: 0 additions & 45 deletions timezone/testsuite/tests/CheckTime.rb

This file was deleted.

0 comments on commit b08bfe8

Please sign in to comment.