diff --git a/lib/meilisearch/rails/pagination.rb b/lib/meilisearch/rails/pagination.rb index 22b8c70c..34a994fa 100644 --- a/lib/meilisearch/rails/pagination.rb +++ b/lib/meilisearch/rails/pagination.rb @@ -18,7 +18,7 @@ def self.create(results, total_hits, options = {}) def self.log_pagy_error MeiliSearch::Rails.logger - .warning('[meilisearch-rails] Remove `pagination_backend: :pagy` from your initializer, `pagy` it is not required for `pagy`') + .warn('[meilisearch-rails] Remove `pagination_backend: :pagy` from your initializer, `pagy` it is not required for `pagy`') end def self.load_pagination!(pagination_backend, results, total_hits, options) diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 91bd6fa0..98e0c7e5 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -803,12 +803,13 @@ Movie.create(title: 'Harry Potter').index!(true) logger = double - allow(logger).to receive(:warning) + + allow(logger).to receive(:warn) allow(MeiliSearch::Rails).to receive(:logger).and_return(logger) Movie.search('') - expect(logger).to have_received(:warning) + expect(logger).to have_received(:warn) .with('[meilisearch-rails] Remove `pagination_backend: :pagy` from your initializer, `pagy` it is not required for `pagy`') end end