mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: simplify CSV file upload
This commit is contained in:
@@ -5,15 +5,8 @@ describe Jobs::BulkInvite do
|
||||
context '.execute' do
|
||||
|
||||
it 'raises an error when the filename is missing' do
|
||||
expect { Jobs::BulkInvite.new.execute(identifier: '46-discoursecsv', chunks: '1') }.to raise_error(Discourse::InvalidParameters)
|
||||
end
|
||||
|
||||
it 'raises an error when the identifier is missing' do
|
||||
expect { Jobs::BulkInvite.new.execute(filename: 'discourse.csv', chunks: '1') }.to raise_error(Discourse::InvalidParameters)
|
||||
end
|
||||
|
||||
it 'raises an error when the chunks is missing' do
|
||||
expect { Jobs::BulkInvite.new.execute(filename: 'discourse.csv', identifier: '46-discoursecsv') }.to raise_error(Discourse::InvalidParameters)
|
||||
user = Fabricate(:user)
|
||||
expect { Jobs::BulkInvite.new.execute(current_user_id: user.id) }.to raise_error(Discourse::InvalidParameters)
|
||||
end
|
||||
|
||||
context '.read_csv_file' do
|
||||
|
||||
Reference in New Issue
Block a user