better file create

This commit is contained in:
Kyle Drake 2015-05-07 14:32:52 -07:00
parent 85fc6d6e39
commit 93b5b94f14
6 changed files with 97 additions and 22 deletions

View file

@ -17,10 +17,22 @@ describe 'dashboard' do
visit '/dashboard'
click_link 'New Folder'
fill_in 'name', with: 'testimages'
click_button 'Create'
#click_button 'Create'
all('#createDir button[type=submit]').first.click
page.must_have_content /testimages/
File.directory?(@site.files_path('testimages')).must_equal true
end
it 'creates a new file' do
random = SecureRandom.uuid.gsub('-', '')
visit '/dashboard'
click_link 'New Page / File'
fill_in 'filename', with: "#{random}.html"
#click_button 'Create'
all('#createFile button[type=submit]').first.click
page.must_have_content /#{random}\.html/
File.exist?(@site.files_path("#{random}.html")).must_equal true
end
end
end
end
end