mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 09:11:28 +02:00
use style.css for new installs, refactor new install to use store_file
This commit is contained in:
parent
42e21bce9a
commit
53d25cba1d
6 changed files with 39 additions and 23 deletions
|
@ -38,10 +38,16 @@ describe 'signup' do
|
|||
fill_in_valid
|
||||
click_signup_button
|
||||
site_created?.must_equal true
|
||||
|
||||
assert_equal(
|
||||
true,
|
||||
File.exist?(File.join(Site::SITE_FILES_ROOT, @site[:username], 'index.html'))
|
||||
)
|
||||
|
||||
site = Site[username: @site[:username]]
|
||||
site.site_files.length.must_equal 4
|
||||
site.site_changed.must_equal false
|
||||
site.site_updated_at.must_equal nil
|
||||
end
|
||||
|
||||
it 'fails to create for existing site' do
|
||||
|
|
|
@ -72,8 +72,8 @@ describe 'site_files' do
|
|||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/img/test.jpg', 'image/jpeg')
|
||||
last_response.body.must_match /successfully uploaded/i
|
||||
@site.reload.changed_count.must_equal 2
|
||||
@site.site_files.count.must_equal 1
|
||||
digest.wont_equal @site.reload.site_files.first.sha1_hash
|
||||
@site.site_files.select {|f| f.path == 'test.jpg'}.length.must_equal 1
|
||||
digest.wont_equal @site.site_files_dataset.where(path: 'test.jpg').first.sha1_hash
|
||||
end
|
||||
|
||||
it 'works with directory path' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue