mirror of
https://github.com/neocities/neocities.git
synced 2025-07-20 09:36:00 +02:00
more fixes for tests
This commit is contained in:
parent
8052844640
commit
9c6ed2d7c5
6 changed files with 17 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue