diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-08-10 15:58:30 -0400 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2017-08-10 15:58:30 -0400 |
commit | e43ba973a3ac34ad32b08caff99ec306ffe9fdd4 (patch) | |
tree | a120a5c508a75a7ae3baced3a0699e4141eb7744 /activestorage/test | |
parent | 8f44d1661981a57838543b8a9890c855d7b02b89 (diff) | |
download | rails-e43ba973a3ac34ad32b08caff99ec306ffe9fdd4.tar.gz rails-e43ba973a3ac34ad32b08caff99ec306ffe9fdd4.tar.bz2 rails-e43ba973a3ac34ad32b08caff99ec306ffe9fdd4.zip |
Run Active Storage tests in CI (#30144)
Diffstat (limited to 'activestorage/test')
-rw-r--r-- | activestorage/test/models/attachments_test.rb | 7 | ||||
-rw-r--r-- | activestorage/test/service/configurations.yml | 14 | ||||
-rw-r--r-- | activestorage/test/template/image_tag_test.rb | 4 | ||||
-rw-r--r-- | activestorage/test/test_helper.rb | 13 |
4 files changed, 18 insertions, 20 deletions
diff --git a/activestorage/test/models/attachments_test.rb b/activestorage/test/models/attachments_test.rb index 82256e1f44..58af5dce6e 100644 --- a/activestorage/test/models/attachments_test.rb +++ b/activestorage/test/models/attachments_test.rb @@ -1,13 +1,6 @@ require "test_helper" require "database/setup" -# ActiveRecord::Base.logger = Logger.new(STDOUT) - -class User < ActiveRecord::Base - has_one_attached :avatar - has_many_attached :highlights -end - class ActiveStorage::AttachmentsTest < ActiveSupport::TestCase include ActiveJob::TestHelper diff --git a/activestorage/test/service/configurations.yml b/activestorage/test/service/configurations.yml index d7aa672573..56ed37be5d 100644 --- a/activestorage/test/service/configurations.yml +++ b/activestorage/test/service/configurations.yml @@ -1,10 +1,10 @@ -s3: - service: S3 - access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %> - secret_access_key: <%= ENV["AWS_SECRET_KEY"] %> - region: us-east-2 - bucket: rails-ci-activestorage - +# s3: +# service: S3 +# access_key_id: "" +# secret_access_key: "" +# region: "" +# bucket: "" +# # gcs: # service: GCS # keyfile: { diff --git a/activestorage/test/template/image_tag_test.rb b/activestorage/test/template/image_tag_test.rb index 83c95c01a1..b285cd2e14 100644 --- a/activestorage/test/template/image_tag_test.rb +++ b/activestorage/test/template/image_tag_test.rb @@ -1,10 +1,6 @@ require "test_helper" require "database/setup" -class User < ActiveRecord::Base - has_one_attached :avatar -end - class ActiveStorage::ImageTagTest < ActionView::TestCase tests ActionView::Helpers::AssetTagHelper diff --git a/activestorage/test/test_helper.rb b/activestorage/test/test_helper.rb index 50cc72cbe3..a9b1d325c4 100644 --- a/activestorage/test/test_helper.rb +++ b/activestorage/test/test_helper.rb @@ -4,11 +4,15 @@ require "bundler/setup" require "active_support" require "active_support/test_case" require "active_support/testing/autorun" -require "byebug" + +begin + require "byebug" +rescue LoadError +end require "active_job" ActiveJob::Base.queue_adapter = :test -ActiveJob::Base.logger = nil +ActiveJob::Base.logger = ActiveSupport::Logger.new(nil) require "active_storage" @@ -58,3 +62,8 @@ end require "global_id" GlobalID.app = "ActiveStorageExampleApp" ActiveRecord::Base.send :include, GlobalID::Identification + +class User < ActiveRecord::Base + has_one_attached :avatar + has_many_attached :highlights +end |