aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/service/configurator_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/service/configurator_test.rb b/test/service/configurator_test.rb
new file mode 100644
index 0000000000..f033fc7d20
--- /dev/null
+++ b/test/service/configurator_test.rb
@@ -0,0 +1,15 @@
+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
+ end
+
+ test "raises error when passing non-existent service name" do
+ assert_raise RuntimeError do
+ ActiveStorage::Service::Configurator.build(:bigfoot, SERVICE_CONFIGURATIONS)
+ end
+ end
+end
+