comparison test/controllers/pastes_controller_test.rb @ 484:84ca55a0568e

Fix pasting base64 gzip and fix tests
author nanaya <me@nanaya.pro>
date Sun, 28 Nov 2021 20:01:18 +0900
parents 1d113463d154
children d2ef59c9a4b4
comparison
equal deleted inserted replaced
483:02d043b1967d 484:84ca55a0568e
9 assert_response :redirect 9 assert_response :redirect
10 end 10 end
11 11
12 test "creates paste from gzip" do 12 test "creates paste from gzip" do
13 assert_difference("Paste.count", 1) do 13 assert_difference("Paste.count", 1) do
14 post :create, :params => { "paste" => { "paste_gzip" => ActiveSupport::Gzip.compress("here be paste") } } 14 post :create, :params => { "paste" => { "paste_gzip" => fixture_file_upload('hello_world.txt.gz') } }
15 end 15 end
16 16
17 assert_response :redirect 17 assert_response :redirect
18 end 18 end
19 19