more fixes for tests

This commit is contained in:
Kyle Drake 2022-11-06 14:06:36 -06:00
parent 8052844640
commit 9c6ed2d7c5
6 changed files with 17 additions and 34 deletions

View file

@ -83,13 +83,13 @@ describe 'site_files' do
it 'wont set an empty directory' do
@site.create_directory 'dirone'
@site.site_files.select {|sf| sf.path == 'dirone'}.length.must_equal 1
_(@site.site_files.select {|sf| sf.path == 'dirone'}.length).must_equal 1
dirone = @site.site_files_dataset.where(path: 'dirone').first
res = dirone.rename('')
@site.site_files_dataset.where(path: '').count.must_equal 0
res.must_equal [false, 'cannot rename to empty path']
@site.site_files_dataset.where(path: '').count.wont_equal 1
_(@site.site_files_dataset.where(path: '').count).must_equal 0
_(res).must_equal [false, 'cannot rename to empty path']
_(@site.site_files_dataset.where(path: '').count).wont_equal 1
end
it 'changes path of files and dirs within directory when changed' do