Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 4994e1a

Browse files
committed
Configurator tests: work against test-local config
So tests pass when service configs aren't set up. References #28
1 parent bb2d7fc commit 4994e1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/service/configurator_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
class ActiveStorage::Service::ConfiguratorTest < ActiveSupport::TestCase
44
test "builds correct service instance based on service name" do
5-
service = ActiveStorage::Service::Configurator.build(:s3, SERVICE_CONFIGURATIONS)
6-
assert_instance_of ActiveStorage::Service::S3Service, service
5+
service = ActiveStorage::Service::Configurator.build(:foo, foo: { service: "Disk", root: "path" })
6+
assert_instance_of ActiveStorage::Service::DiskService, service
77
end
88

99
test "raises error when passing non-existent service name" do
1010
assert_raise RuntimeError do
11-
ActiveStorage::Service::Configurator.build(:bigfoot, SERVICE_CONFIGURATIONS)
11+
ActiveStorage::Service::Configurator.build(:bigfoot, {})
1212
end
1313
end
1414
end

0 commit comments

Comments
 (0)