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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user