Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Sep 12, 2023
1 parent 6659391 commit f09e59a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/search_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def call(query, account, limit, options = {})
@offset = options[:type].blank? ? 0 : options[:offset].to_i
@resolve = options[:resolve] || false
@following = options[:following] || false
@searchability = options[:searchability] || account.user&.setting_default_searchability_of_search.to_s || 'public'
@searchability = options[:searchability] || account&.user&.setting_default_searchability_of_search.to_s || 'public'

default_results.tap do |results|
next if @query.blank? || @limit.zero?
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/search_query_transformer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rails_helper'

describe SearchQueryTransformer do
subject { described_class.new.apply(parser, current_account: account) }
subject { described_class.new.apply(parser, current_account: account, searchability: :public) }

let(:account) { Fabricate(:account) }
let(:parser) { SearchQueryParser.new.parse(query) }
Expand Down

0 comments on commit f09e59a

Please sign in to comment.