mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Assert correct response body
This commit is contained in:
parent
4a786c0fdf
commit
8ae38dab52
1 changed files with 6 additions and 4 deletions
|
@ -8,16 +8,18 @@ class ActiveStorage::DiskControllerTest < ActionDispatch::IntegrationTest
|
||||||
blob = create_blob
|
blob = create_blob
|
||||||
|
|
||||||
get blob.service_url
|
get blob.service_url
|
||||||
assert_equal "inline; filename=\"hello.txt\"; filename*=UTF-8''hello.txt", @response.headers["Content-Disposition"]
|
assert_equal "inline; filename=\"hello.txt\"; filename*=UTF-8''hello.txt", response.headers["Content-Disposition"]
|
||||||
assert_equal "text/plain", @response.headers["Content-Type"]
|
assert_equal "text/plain", response.headers["Content-Type"]
|
||||||
|
assert_equal "Hello world!", response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
test "showing blob as attachment" do
|
test "showing blob as attachment" do
|
||||||
blob = create_blob
|
blob = create_blob
|
||||||
|
|
||||||
get blob.service_url(disposition: :attachment)
|
get blob.service_url(disposition: :attachment)
|
||||||
assert_equal "attachment; filename=\"hello.txt\"; filename*=UTF-8''hello.txt", @response.headers["Content-Disposition"]
|
assert_equal "attachment; filename=\"hello.txt\"; filename*=UTF-8''hello.txt", response.headers["Content-Disposition"]
|
||||||
assert_equal "text/plain", @response.headers["Content-Type"]
|
assert_equal "text/plain", response.headers["Content-Type"]
|
||||||
|
assert_equal "Hello world!", response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue