mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
add tests about is_interesting_file
This commit is contained in:
parent
2b0cf41336
commit
0ba2409c9a
@ -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"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user