Fix moving saved searches tests.

4) Failure:
TagAliasTest#test_: A tag alias should move saved searches. [/home/danbooru/src/danbooru/test/unit/tag_alias_test.rb:80]:
Expected: "123 bbb 456"
  Actual: "123 ... 456"

 36) Failure:
Moderator::TagBatchChangeTest#test_: a tag batch change should move saved searches. [/home/danbooru/src/danbooru/test/unit/moderator/tag_batch_change_test.rb:40]:
Expected: "123 456 bbb"
  Actual: "123 ... 456"
This commit is contained in:
evazion
2017-02-03 01:28:10 -06:00
parent 72502dbe2f
commit ace7d0c12d
3 changed files with 7 additions and 2 deletions

View File

@@ -16,5 +16,8 @@ module SavedSearchTestHelper
service = mock_sqs_service.new
SavedSearch.stubs(:sqs_service).returns(service)
Danbooru.config.stubs(:aws_sqs_saved_search_url).returns("http://localhost:3002")
Danbooru.config.stubs(:listbooru_auth_key).returns("blahblahblah")
Danbooru.config.stubs(:listbooru_server).returns("http://localhost:3001")
end
end

View File

@@ -8,8 +8,6 @@ module Moderator
def setup
super
mock_saved_search_service!
Danbooru.config.stubs(:listbooru_auth_key).returns("blahblahblah")
Danbooru.config.stubs(:listbooru_server).returns("http://localhost:3001")
end
context "a tag batch change" do

View File

@@ -1,6 +1,9 @@
require 'test_helper'
require 'helpers/saved_search_test_helper'
class TagAliasTest < ActiveSupport::TestCase
include SavedSearchTestHelper
context "A tag alias" do
setup do
Timecop.travel(1.month.ago) do
@@ -10,6 +13,7 @@ class TagAliasTest < ActiveSupport::TestCase
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
Delayed::Worker.delay_jobs = false
mock_saved_search_service!
end
teardown do