aboutsummaryrefslogtreecommitdiffstats
path: root/test/disk_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/disk_controller_test.rb')
-rw-r--r--test/disk_controller_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/disk_controller_test.rb b/test/disk_controller_test.rb
index ee172b23f7..eaf0b497ac 100644
--- a/test/disk_controller_test.rb
+++ b/test/disk_controller_test.rb
@@ -4,30 +4,30 @@ require "database/setup"
require "action_controller"
require "action_controller/test_case"
-require "active_file/disk_controller"
-require "active_file/verified_key_with_expiration"
+require "active_vault/disk_controller"
+require "active_vault/verified_key_with_expiration"
-class ActiveFile::DiskControllerTest < ActionController::TestCase
+class ActiveVault::DiskControllerTest < ActionController::TestCase
Routes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
routes.draw do
- get "/rails/blobs/:encoded_key" => "active_file/disk#show", as: :rails_disk_blob
+ get "/rails/blobs/:encoded_key" => "active_vault/disk#show", as: :rails_disk_blob
end
end
setup do
@blob = create_blob
@routes = Routes
- @controller = ActiveFile::DiskController.new
+ @controller = ActiveVault::DiskController.new
end
test "showing blob inline" do
- get :show, params: { encoded_key: ActiveFile::VerifiedKeyWithExpiration.encode(@blob.key, expires_in: 5.minutes) }
+ get :show, params: { encoded_key: ActiveVault::VerifiedKeyWithExpiration.encode(@blob.key, expires_in: 5.minutes) }
assert_equal "inline; filename=\"#{@blob.filename}\"", @response.headers["Content-Disposition"]
assert_equal "text/plain", @response.headers["Content-Type"]
end
test "sending blob as attachment" do
- get :show, params: { encoded_key: ActiveFile::VerifiedKeyWithExpiration.encode(@blob.key, expires_in: 5.minutes), disposition: :attachment }
+ get :show, params: { encoded_key: ActiveVault::VerifiedKeyWithExpiration.encode(@blob.key, expires_in: 5.minutes), disposition: :attachment }
assert_equal "attachment; filename=\"#{@blob.filename}\"", @response.headers["Content-Disposition"]
assert_equal "text/plain", @response.headers["Content-Type"]
end