Fix tests
This commit is contained in:
parent
6659391c44
commit
f09e59a96c
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class SearchService < BaseService
|
|||
@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?
|
||||
|
|
|
@ -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) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue