prohibit third-party form sites that are almost exclusively used for phishing

This commit is contained in:
Kyle Drake 2015-02-27 09:44:43 -08:00
parent c2978f03f0
commit e1ef255f84
3 changed files with 58 additions and 21 deletions

View file

@ -48,6 +48,11 @@ describe 'site_files' do
end
describe 'upload' do
it 'fails for suspected phishing' do
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/phishing.html', 'text/html')
File.exists?(@site.files_path('phishing.html')).must_equal false
end
it 'works with empty files' do
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/empty.js', 'text/javascript')
File.exists?(@site.files_path('empty.js')).must_equal true