aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/service/configurator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/service/configurator_test.rb')
-rw-r--r--activestorage/test/service/configurator_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activestorage/test/service/configurator_test.rb b/activestorage/test/service/configurator_test.rb
index 1c9c5c3aa0..3ef9cf9fb6 100644
--- a/activestorage/test/service/configurator_test.rb
+++ b/activestorage/test/service/configurator_test.rb
@@ -9,6 +9,12 @@ class ActiveStorage::Service::ConfiguratorTest < ActiveSupport::TestCase
assert_equal "path", service.root
end
+ test "builds correct service instance based on lowercase service name" do
+ service = ActiveStorage::Service::Configurator.build(:foo, foo: { service: "disk", root: "path" })
+ assert_instance_of ActiveStorage::Service::DiskService, service
+ assert_equal "path", service.root
+ end
+
test "raises error when passing non-existent service name" do
assert_raise RuntimeError do
ActiveStorage::Service::Configurator.build(:bigfoot, {})