A wotg fixtures path
This commit is contained in:
parent
dbcebd9be5
commit
23ee74f108
@ -25,7 +25,7 @@ class DmsfFolderApiTest < RedmineDmsf::Test::IntegrationTest
|
|||||||
fixtures :dmsf_folders, :dmsf_files, :dmsf_file_revisions, :projects, :users, :members, :roles
|
fixtures :dmsf_folders, :dmsf_files, :dmsf_file_revisions, :projects, :users, :members, :roles
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
DmsfFile.storage_path = File.expand_path '../../../../fixtures/files', __FILE__
|
DmsfFile.storage_path = File.expand_path '../../../fixtures/files', __FILE__
|
||||||
@jsmith = User.find_by_id 2
|
@jsmith = User.find_by_id 2
|
||||||
@file1 = DmsfFile.find_by_id 1
|
@file1 = DmsfFile.find_by_id 1
|
||||||
@folder1 = DmsfFolder.find_by_id 1
|
@folder1 = DmsfFolder.find_by_id 1
|
||||||
|
|||||||
@ -29,11 +29,12 @@ class DmsfWebdavMoveTest < RedmineDmsf::Test::IntegrationTest
|
|||||||
|
|
||||||
def setup
|
def setup
|
||||||
DmsfLock.delete_all # Delete all locks that are in our test DB - probably not safe but ho hum
|
DmsfLock.delete_all # Delete all locks that are in our test DB - probably not safe but ho hum
|
||||||
timestamp = DateTime.now.strftime("%y%m%d%H%M")
|
timestamp = DateTime.now.strftime('%y%m%d%H%M')
|
||||||
DmsfFile.storage_path = File.expand_path("./dmsf_test-#{timestamp}", DmsfHelper.temp_dir)
|
DmsfFile.storage_path = File.expand_path("./dmsf_test-#{timestamp}", DmsfHelper.temp_dir)
|
||||||
Dir.mkdir(DmsfFile.storage_path) unless File.directory?(DmsfFile.storage_path)
|
Dir.mkdir(DmsfFile.storage_path) unless File.directory?(DmsfFile.storage_path)
|
||||||
# Copy the physical files to the temporary storage
|
# Copy the physical files to the temporary storage
|
||||||
FileUtils.cp_r File.dirname(__FILE__) + "/../../fixtures/files/.", DmsfFile.storage_path
|
files = File.expand_path('../../../fixtures/files/.', __FILE__)
|
||||||
|
FileUtils.cp_r files, DmsfFile.storage_path
|
||||||
|
|
||||||
@admin = credentials 'admin'
|
@admin = credentials 'admin'
|
||||||
@jsmith = credentials 'jsmith'
|
@jsmith = credentials 'jsmith'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user