# frozen_string_literal: true

require 'rails_helper'

RSpec.describe SearchResults, type: :service do
  it { is_expected.to respond_to(:set) }
  it { is_expected.to respond_to(:set=) }
  it { is_expected.to respond_to(:contains_exact_match) }
  it { is_expected.to respond_to(:contains_exact_match=) }

  it { is_expected.to delegate_method(:size).to(:set) }
  it { is_expected.to delegate_method(:each).to(:set) }
  it { is_expected.to delegate_method(:present?).to(:set) }

  it 'defaults to empty set and false' do
    expect(subject.set).to be_empty
    expect(subject.contains_exact_match).to eq false
  end
end
