From 4c7bb23b040932815309102de898174f984c2a82 Mon Sep 17 00:00:00 2001
From: Kieron Taylor <ktaylor@ebi.ac.uk>
Date: Fri, 21 Jun 2013 14:37:27 +0000
Subject: [PATCH] New test for fetch_all_dependant_terms.

---
 modules/t/ontologyTerm.t | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/t/ontologyTerm.t b/modules/t/ontologyTerm.t
index e5116c3694..86b17fd95c 100644
--- a/modules/t/ontologyTerm.t
+++ b/modules/t/ontologyTerm.t
@@ -78,7 +78,9 @@ is(@{$efo_roots}, 0, "Found no efo roots");
     is_deeply($term, $direct_term, 'Fetching the OntologyTerm from the OntologyXref should match the same object from OntologyTermAdaptor');
   }
 }
-
-
+$term = $go_adaptor->fetch_by_accession('GO:0000182',1); # unintentionally picked an obsolete term for testing on.
+my $term_list = $go_adaptor->fetch_all_by_descendant_term($term);
+my $inclusive_term_list = $go_adaptor->fetch_all_by_descendant_term($term,undef,undef,1);
+ok (scalar(@$term_list) == scalar(@$inclusive_term_list) - 1, "Zero_distance flag on fetch_all_by_descendant_term");
 
 done_testing();
-- 
GitLab