Implement IPFS archiving (locally). Refactor store_file.

This commit is contained in:
Kyle Drake 2015-05-21 23:10:59 -07:00
parent 235460abf0
commit 8424cc02e8
10 changed files with 176 additions and 90 deletions

View file

@ -97,7 +97,7 @@ describe 'site_files' do
args = ScreenshotWorker.jobs.first['args']
args.first.must_equal @site.username
args.last.must_equal 'index.html'
@site.title.must_equal "#{@site.username}.neocities.org"
@site.title.must_equal "The web site of #{@site.username}"
@site.reload
@site.site_changed.must_equal true
@site.title.must_equal 'Hello?'
@ -112,7 +112,6 @@ describe 'site_files' do
@site.reload.title.must_equal title
end
it 'succeeds with valid file' do
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/test.jpg', 'image/jpeg')
last_response.body.must_match /successfully uploaded/i