diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2017-07-09 13:21:14 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2017-07-09 13:23:02 -0700 |
commit | 4994e1aedd09bec450da04a3faf1188e4480906a (patch) | |
tree | 691e2f93d96f2d3f351aaefc9d6a1c3edefa1aed | |
parent | bb2d7fcbf58d621e1a607df01aab5ff232255a88 (diff) | |
download | rails-4994e1aedd09bec450da04a3faf1188e4480906a.tar.gz rails-4994e1aedd09bec450da04a3faf1188e4480906a.tar.bz2 rails-4994e1aedd09bec450da04a3faf1188e4480906a.zip |
Configurator tests: work against test-local config
So tests pass when service configs aren't set up.
References #28
-rw-r--r-- | test/service/configurator_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/service/configurator_test.rb b/test/service/configurator_test.rb index f033fc7d20..f8e4dccc9c 100644 --- a/test/service/configurator_test.rb +++ b/test/service/configurator_test.rb @@ -2,13 +2,13 @@ require "service/shared_service_tests" class ActiveStorage::Service::ConfiguratorTest < ActiveSupport::TestCase test "builds correct service instance based on service name" do - service = ActiveStorage::Service::Configurator.build(:s3, SERVICE_CONFIGURATIONS) - assert_instance_of ActiveStorage::Service::S3Service, service + service = ActiveStorage::Service::Configurator.build(:foo, foo: { service: "Disk", root: "path" }) + assert_instance_of ActiveStorage::Service::DiskService, service end test "raises error when passing non-existent service name" do assert_raise RuntimeError do - ActiveStorage::Service::Configurator.build(:bigfoot, SERVICE_CONFIGURATIONS) + ActiveStorage::Service::Configurator.build(:bigfoot, {}) end end end |