./test/dolt/view/tree_test.rb in dolt-0.4.2 vs ./test/dolt/view/tree_test.rb in dolt-0.4.3
- old
+ new
@@ -68,9 +68,21 @@
assert_equal "repo_actions.rb", entries[5][:name]
assert_equal "template_renderer.rb", entries[6][:name]
assert_equal "version.rb", entries[7][:name]
assert_equal "view.rb", entries[8][:name]
end
+
+ it "lumps submodules in with directories" do
+ async = { :name => "async", :type => :tree }
+ disk_repo_resolver = { :type => :blob, :name => "disk_repo_resolver.rb" }
+ git = { :type => :submodule, :name => "git" }
+ tree = OpenStruct.new({ :entries => [async, disk_repo_resolver, git] })
+ entries = tree_entries(tree)
+
+ assert_equal :tree, entries[0][:type]
+ assert_equal :submodule, entries[1][:type]
+ assert_equal :blob, entries[2][:type]
+ end
end
describe "#partition_path" do
it "partitions root into double array" do
parts = partition_path("")