Skip to content

Commit 59fa0ba

Browse files
committed
Fixed unit tests #951
1 parent 62ad615 commit 59fa0ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/groovy/au/org/ala/ecodata/ParatooServiceSpec.groovy

+5-3
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ class ParatooServiceSpec extends MongoSpec implements ServiceUnitTest<ParatooSer
713713
then:
714714
outputSpeciesId != null
715715
result == [name: "Acacia glauca Willd. (Acacia glauca)", scientificName: "Acacia glauca Willd.", guid: "A_GUID", commonName: "Acacia glauca", taxonRank: "Species"]
716-
2 * speciesReMatchService.searchByName(_) >> null
716+
1 * speciesReMatchService.searchByName(_) >> null
717+
1 * speciesReMatchService.searchByName(_, false, true) >> null
717718

718719
when: // no scientific name
719720
result = service.transformSpeciesName("Frogs [Class] (scientific: )")
@@ -722,7 +723,8 @@ class ParatooServiceSpec extends MongoSpec implements ServiceUnitTest<ParatooSer
722723
then:
723724
outputSpeciesId != null
724725
result == [name: "Frogs", scientificName: "", guid: "A_GUID", commonName: "Frogs", taxonRank: "Class"]
725-
2 * speciesReMatchService.searchByName(_) >> null
726+
1 * speciesReMatchService.searchByName(_) >> null
727+
1 * speciesReMatchService.searchByName(_, false, true) >> null
726728
}
727729

728730
void "buildTreeFromParentChildRelationships should build tree correctly"() {
@@ -1431,7 +1433,7 @@ class ParatooServiceSpec extends MongoSpec implements ServiceUnitTest<ParatooSer
14311433
result.lut.remove('outputSpeciesId')
14321434
then:
14331435
1 * speciesReMatchService.searchByName("Felis catus") >> null
1434-
1 * speciesReMatchService.searchByName("Cats") >> [
1436+
1 * speciesReMatchService.searchByName("Cats", false, true) >> [
14351437
commonName: "Cat",
14361438
scientificName: "Felis catus",
14371439
guid: "TAXON_ID",

0 commit comments

Comments
 (0)