mirror of
https://github.com/hkalexling/Mango.git
synced 2026-01-25 00:00:36 -05:00
add tests about is_interesting_file
This commit is contained in:
@@ -35,6 +35,26 @@ describe "compare_numerically" do
|
||||
end
|
||||
end
|
||||
|
||||
describe "is_interesting_file" do
|
||||
it "returns true when filename has interesting file extension" do
|
||||
filename = "manga.cbz"
|
||||
result = is_interesting_file filename
|
||||
result.should eq true
|
||||
end
|
||||
|
||||
it "returns false if file extension is not interesting" do
|
||||
filename = "info.json"
|
||||
result = is_interesting_file filename
|
||||
result.should eq false
|
||||
end
|
||||
|
||||
it "returns true when fileext has uppercase" do
|
||||
filename = "manga.ZiP"
|
||||
result = is_interesting_file filename
|
||||
result.should eq true
|
||||
end
|
||||
end
|
||||
|
||||
describe "chapter_sort" do
|
||||
it "sorts correctly" do
|
||||
ary = ["Vol.1 Ch.01", "Vol.1 Ch.02", "Vol.2 Ch. 2.5", "Ch. 3", "Ch.04"]
|
||||
|
||||
Reference in New Issue
Block a user