aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/service/configurator_test.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-01-15 13:06:17 -0500
committerGitHub <noreply@github.com>2018-01-15 13:06:17 -0500
commitc2ba530c43244b5b60fd629f61cd8b44c43ecda9 (patch)
tree76c572f419a8e30b4ba2d2ae22570844ba28361e /activestorage/test/service/configurator_test.rb
parentd8e7d6b03c50f4f01c333461c46666d8210e2c17 (diff)
downloadrails-c2ba530c43244b5b60fd629f61cd8b44c43ecda9.tar.gz
rails-c2ba530c43244b5b60fd629f61cd8b44c43ecda9.tar.bz2
rails-c2ba530c43244b5b60fd629f61cd8b44c43ecda9.zip
Extract content types from blob data
Diffstat (limited to 'activestorage/test/service/configurator_test.rb')
-rw-r--r--activestorage/test/service/configurator_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activestorage/test/service/configurator_test.rb b/activestorage/test/service/configurator_test.rb
index a2fd035e02..0a79b37aa4 100644
--- a/activestorage/test/service/configurator_test.rb
+++ b/activestorage/test/service/configurator_test.rb
@@ -4,8 +4,11 @@ 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(:foo, foo: { service: "Disk", root: "path" })
+ service = ActiveStorage::Service::Configurator.build(:foo, foo: { service: "Disk", root: "path", host: "http://localhost:3000" })
+
assert_instance_of ActiveStorage::Service::DiskService, service
+ assert_equal "path", service.root
+ assert_equal "http://localhost:3000", service.host
end
test "raises error when passing non-existent service name" do