Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a test for the nil case

  • Loading branch information...
commit c5de6a998e6d09383046ae076fb741c66e8fa996 1 parent 4968725
Ted Nyman tnm authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/tree_test.rb
5 test/tree_test.rb
View
@@ -37,6 +37,11 @@ def test_get_entry_by_oid
assert_equal :blob, bent[:type]
end
+ def test_get_entry_by_oid_returns_nil_if_no_oid
+ nada = @tree.get_entry_by_oid("1385f264afb75a56a5bec74243be9b367ba4ca07")
+ assert_equal nil, nada
+ end
+
def test_get_entry_by_oid_throws_error_if_wrong_type
assert_raises TypeError do
@tree.get_entry_by_oid(:not_a_string)
Please sign in to comment.
Something went wrong with that request. Please try again.