fixes #3039
This commit is contained in:
@@ -27,6 +27,6 @@ module IqdbTestHelper
|
||||
url = "http://localhost:3004/similar?key=hunter2&url=#{CGI.escape source}&ref"
|
||||
body = matches.map { |post| { post_id: post.id } }.to_json
|
||||
|
||||
FakeWeb.register_uri(:get, url, body: body)
|
||||
stub_request(:get, url).to_return(body: body)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
module ReportbooruHelper
|
||||
def mock_popular_search_service!
|
||||
Danbooru.config.stubs(:reportbooru_server).returns("http://localhost:3003")
|
||||
FakeWeb.register_uri(:get, "http://localhost:3003/hits/month?date=#{Date.today}", body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
FakeWeb.register_uri(:get, "http://localhost:3003/hits/day?date=#{Date.today}", body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
stub_request(:get, "http://localhost:3003/hits/month?date=#{Date.today}").to_return(body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
stub_request(:get, "http://localhost:3003/hits/day?date=#{Date.today}").to_return(body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
end
|
||||
|
||||
def mock_missed_search_service!
|
||||
Danbooru.config.stubs(:reportbooru_server).returns("http://localhost:3003")
|
||||
FakeWeb.register_uri(:get, "http://localhost:3003/missed_searches", body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
stub_request(:get, "http://localhost:3003/missed_searches").to_return(body: "kantai_collection 1000.0\ntouhou 500.0")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user