Fix failing spec.

This commit is contained in:
Guo Xiang Tan 2019-04-16 09:59:35 +08:00
parent ce4c8e957b
commit d6e45864ce
2 changed files with 4 additions and 5 deletions

View File

@ -30,8 +30,7 @@ module Jobs
ensure
# send notification to user regarding progress
notify_user
FileUtils.rm_rf(csv_path) if csv_path
File.delete(csv_path) if csv_path
end
private

View File

@ -13,9 +13,9 @@ describe Jobs::BulkInvite do
let(:filename) { "#{Invite.base_directory}/#{basename}" }
before do
FileUtils.cp(
"#{Rails.root}/spec/fixtures/csv/#{basename}",
filename
Invite.create_csv(
fixture_file_upload("#{Rails.root}/spec/fixtures/csv/#{basename}"),
"bulk_invite"
)
end