Add Docker and Travis config files to enable CI tests

Also fixes some Rails 6.0 deprecation warnings
This commit is contained in:
Albert Yi
2018-05-01 15:24:24 -07:00
parent fee9acc8a7
commit 79ea6f7e6c
18 changed files with 138 additions and 58 deletions

View File

@@ -96,17 +96,17 @@ class UploadTest < ActiveSupport::TestCase
context "determining if a file is downloadable" do
should "classify HTTP sources as downloadable" do
@upload = FactoryBot.create(:source_upload, :source => "http://www.example.com/1.jpg")
@upload = FactoryBot.create(:source_upload, :source => "http://www.google.com/1.jpg")
assert_not_nil(@upload.is_downloadable?)
end
should "classify HTTPS sources as downloadable" do
@upload = FactoryBot.create(:source_upload, :source => "https://www.example.com/1.jpg")
@upload = FactoryBot.create(:source_upload, :source => "https://www.google.com/1.jpg")
assert_not_nil(@upload.is_downloadable?)
end
should "classify non-HTTP/HTTPS sources as not downloadable" do
@upload = FactoryBot.create(:source_upload, :source => "ftp://www.example.com/1.jpg")
@upload = FactoryBot.create(:source_upload, :source => "ftp://www.google.com/1.jpg")
assert_nil(@upload.is_downloadable?)
end
end