fix tests
This commit is contained in:
@@ -23,6 +23,8 @@ class PopularSearchService
|
||||
end
|
||||
|
||||
def fetch_data
|
||||
return [] unless self.class.enabled?
|
||||
|
||||
dates = date.strftime("%Y-%m-%d")
|
||||
|
||||
Cache.get("ps-day-#{dates}", 1.minute) do
|
||||
|
||||
@@ -3,6 +3,8 @@ require "test_helper"
|
||||
class PostsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The posts controller" do
|
||||
setup do
|
||||
PopularSearchService.stubs(:enabled?).returns(false)
|
||||
|
||||
@user = travel_to(1.month.ago) {create(:user)}
|
||||
as_user do
|
||||
@post = create(:post, :tag_string => "aaaa")
|
||||
|
||||
Reference in New Issue
Block a user