Skip to content

Commit a799cc4

Browse files
author
Dave Sims
committed
Test fall back on connection when domains are nil
1 parent 1f40e82 commit a799cc4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/forest_search_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@ def test_uses_connection_search_when_no_forest_present
1919
@connection.expects(:search)
2020
@forest_search.search({})
2121
end
22+
23+
def test_uses_connection_search_when_domains_nil
24+
# First search returns nil
25+
@connection.expects(:search).returns(nil)
26+
# Since the forest is empty, should fall back on the base connection
27+
@connection.expects(:search)
28+
@forest_search.search({})
29+
end
30+
2231
end

0 commit comments

Comments
 (0)