From 4994e1aedd09bec450da04a3faf1188e4480906a Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Sun, 9 Jul 2017 13:21:14 -0700 Subject: Configurator tests: work against test-local config So tests pass when service configs aren't set up. References #28 --- test/service/configurator_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/service') 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 -- cgit v1.2.3