mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 09:43:44 +08:00
parent
20dc845418
commit
0cbf86f1e7
|
@ -35,16 +35,21 @@ describe Jobs::ReindexSearch do
|
||||||
describe 'rebuild_problem_posts' do
|
describe 'rebuild_problem_posts' do
|
||||||
class FakeIndexer
|
class FakeIndexer
|
||||||
def self.index(post, force:)
|
def self.index(post, force:)
|
||||||
@posts ||= []
|
get_posts.push(post)
|
||||||
@posts.push(post)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.posts
|
def self.posts
|
||||||
@posts ||= []
|
get_posts
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reset
|
def self.reset
|
||||||
@posts.clear
|
get_posts.clear
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def self.get_posts
|
||||||
|
@posts ||= []
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user