fix tests
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# This sets up a docker container suitable for use with Travis CI
|
||||
|
||||
FROM ruby:2.5.1-slim-stretch
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
@@ -2089,7 +2089,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
should "return posts for the date:<d> metatag" do
|
||||
post = FactoryBot.create(:post, created_at: Time.parse("2017-01-01"))
|
||||
post = FactoryBot.create(:post, created_at: Time.parse("2017-01-01 12:00"))
|
||||
|
||||
assert_tag_match([post], "date:2017-01-01")
|
||||
end
|
||||
@@ -2621,9 +2621,13 @@ class PostTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
PostArchive.sqs_service.stubs(:merge?).returns(false)
|
||||
@post = FactoryBot.create(:post, :rating => "q", :tag_string => "aaa", :source => "")
|
||||
@post.update_attributes(:tag_string => "aaa bbb ccc ddd")
|
||||
@post.update_attributes(:tag_string => "bbb xxx yyy", :source => "xyz")
|
||||
@post.update_attributes(:tag_string => "bbb mmm yyy", :source => "abc")
|
||||
@post.reload
|
||||
@post.update(:tag_string => "aaa bbb ccc ddd")
|
||||
@post.reload
|
||||
@post.update(:tag_string => "bbb xxx yyy", :source => "xyz")
|
||||
@post.reload
|
||||
@post.update(:tag_string => "bbb mmm yyy", :source => "abc")
|
||||
@post.reload
|
||||
end
|
||||
|
||||
context "and then reverted to an early version" do
|
||||
|
||||
@@ -264,7 +264,8 @@ class UploadTest < ActiveSupport::TestCase
|
||||
upload = FactoryBot.create(:upload, rating: "s", file: upload_file("test/files/test-512x512.webm"))
|
||||
|
||||
assert_difference("Post.count") do
|
||||
assert_nothing_raised { upload.process! }
|
||||
upload.process!
|
||||
assert_equal("completed", upload.status)
|
||||
end
|
||||
|
||||
post = Post.last
|
||||
@@ -283,7 +284,8 @@ class UploadTest < ActiveSupport::TestCase
|
||||
upload = FactoryBot.create(:upload, rating: "s", file: upload_file("test/files/test-300x300.mp4"))
|
||||
|
||||
assert_difference("Post.count") do
|
||||
assert_nothing_raised { upload.process! }
|
||||
upload.process!
|
||||
assert_equal("completed", upload.status)
|
||||
end
|
||||
|
||||
post = Post.last
|
||||
|
||||
Reference in New Issue
Block a user