diff options
Diffstat (limited to 'activestorage/test/service')
-rw-r--r-- | activestorage/test/service/configurator_test.rb | 2 | ||||
-rw-r--r-- | activestorage/test/service/shared_service_tests.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/activestorage/test/service/configurator_test.rb b/activestorage/test/service/configurator_test.rb index fe8a637ad0..1c9c5c3aa0 100644 --- a/activestorage/test/service/configurator_test.rb +++ b/activestorage/test/service/configurator_test.rb @@ -5,10 +5,8 @@ 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" }) - 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 diff --git a/activestorage/test/service/shared_service_tests.rb b/activestorage/test/service/shared_service_tests.rb index ce28c4393a..24debe7f47 100644 --- a/activestorage/test/service/shared_service_tests.rb +++ b/activestorage/test/service/shared_service_tests.rb @@ -60,6 +60,11 @@ module ActiveStorage::Service::SharedServiceTests assert_equal [ FIXTURE_DATA ], chunks end + test "downloading partially" do + assert_equal "\x10\x00\x00", @service.download_chunk(FIXTURE_KEY, 19..21) + assert_equal "\x10\x00\x00", @service.download_chunk(FIXTURE_KEY, 19...22) + end + test "existing" do assert @service.exist?(FIXTURE_KEY) assert_not @service.exist?(FIXTURE_KEY + "nonsense") |