db hook to manage files
This commit is contained in:
2
test/fixtures/accounts.yml
vendored
2
test/fixtures/accounts.yml
vendored
@ -8,7 +8,7 @@ account1:
|
||||
|
||||
account2:
|
||||
username: client-two
|
||||
password: <%= CryptSerializer.dump('azsxdcfvgbhnjmk,l.;/') %>
|
||||
password: <%= CryptSerializer.dump('azsxdcfvgbhnjmk,l') %>
|
||||
home_folder: client_two
|
||||
contact_email: ftp-user@mailinator.com
|
||||
|
||||
|
@ -24,4 +24,17 @@ class ActiveSupport::TestCase
|
||||
|
||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
||||
fixtures :all
|
||||
|
||||
@@files_checked = false
|
||||
def verify_test_files
|
||||
return if @@files_checked
|
||||
|
||||
FileUtils.mkdir_p AppConfig.ftpusers
|
||||
FileUtils.touch AppConfig.htpasswd
|
||||
@@files_checked = true
|
||||
end
|
||||
|
||||
def setup
|
||||
verify_test_files
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user