pundit: convert uploads to pundit.

This commit is contained in:
evazion
2020-03-20 02:59:02 -05:00
parent d51b0dfe17
commit 7f742242e4
3 changed files with 28 additions and 18 deletions

View File

@@ -243,6 +243,7 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
assert_difference("Upload.count", 1) do
file = Rack::Test::UploadedFile.new("#{Rails.root}/test/files/test.jpg", "image/jpeg")
post_auth uploads_path, @user, params: {:upload => {:file => file, :tag_string => "aaa", :rating => "q", :source => "aaa"}}
assert_redirected_to Upload.last
end
end
end