refactor existing test by using with_schema_search_path

In the removed code line `ActiveRecord::Base.connection.schema_search_path = "public"` should have been within `ensure` block. With that new code that has been take care of.