diff --git a/test/fetch_test.rb b/test/fetch_test.rb index 08b4d06d..b512779e 100644 --- a/test/fetch_test.rb +++ b/test/fetch_test.rb @@ -238,7 +238,7 @@ def test_fetch_by_title_hit end # Id not found, use sql, SELECT id FROM records WHERE title = '...' LIMIT 1" - Item.connection.expects(:exec_query).returns(ActiveRecord::Result.new(["id"], [[1]])) + Item.connection.expects(:internal_exec_query).returns(ActiveRecord::Result.new(["id"], [[1]])) result = Item.fetch_by_title("bob") assert_instance_of(Item, result) diff --git a/test/index_cache_test.rb b/test/index_cache_test.rb index f2892239..f8616464 100644 --- a/test/index_cache_test.rb +++ b/test/index_cache_test.rb @@ -34,7 +34,7 @@ def test_fetch_with_garbage_input def test_fetch_with_unique_adds_limit_clause Item.cache_index(:title, :id, unique: true) - Item.connection.expects(:exec_query) + Item.connection.expects(:internal_exec_query) .with(regexp_matches(/ LIMIT [1?]\Z/i), any_parameters) .returns(ActiveRecord::Result.new([], []))