mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 02:56:26 -05:00
FIX: Randomly failing specs try 2.
This commit is contained in:
parent
903d1dd326
commit
a04dadf9b4
1 changed files with 5 additions and 2 deletions
|
@ -198,7 +198,8 @@ describe Admin::BackupsController do
|
|||
describe "when filename contains invalid characters" do
|
||||
it "should raise an error" do
|
||||
['灰色.tar.gz', '; echo \'haha\'.tar.gz'].each do |invalid_filename|
|
||||
xhr :post, :upload_backup_chunk, resumableFilename: invalid_filename, resumableTotalSize: '0'
|
||||
described_class.any_instance.expects(:has_enough_space_on_disk?).returns(true)
|
||||
xhr :post, :upload_backup_chunk, resumableFilename: invalid_filename, resumableTotalSize: 1
|
||||
|
||||
expect(response.status).to eq(415)
|
||||
expect(response.body).to eq(I18n.t('backup.invalid_filename'))
|
||||
|
@ -208,9 +209,11 @@ describe Admin::BackupsController do
|
|||
|
||||
describe "when filename is valid" do
|
||||
it "should upload the file successfully" do
|
||||
described_class.any_instance.expects(:has_enough_space_on_disk?).returns(true)
|
||||
|
||||
xhr :post, :upload_backup_chunk,
|
||||
resumableFilename: 'test.tar.gz',
|
||||
resumableTotalSize: '0',
|
||||
resumableTotalSize: 1,
|
||||
resumableIdentifier: 'test',
|
||||
resumableChunkNumber: '1',
|
||||
resumableChunkSize: '1',
|
||||
|
|
Loading…
Reference in a new issue