test/test_file.rb in gollum-1.0.1 vs test/test_file.rb in gollum-1.1.0
- old
+ new
@@ -9,10 +9,17 @@
file = Gollum::File.new(@wiki)
assert_nil file.raw_data
end
test "existing file" do
- file = @wiki.file("Mordor/todo.txt")
+ commit = @wiki.repo.commits.first
+ file = @wiki.file("Mordor/todo.txt")
assert_equal "[ ] Write section on Ents\n", file.raw_data
- assert_equal @wiki.repo.commits.first.id, file.version.id
+ assert_equal 'todo.txt', file.name
+ assert_equal commit.id, file.version.id
+ assert_equal commit.author.name, file.version.author.name
+ end
+
+ test "accessing tree" do
+ assert_nil @wiki.file("Mordor")
end
end
\ No newline at end of file