mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: stop hardcoding ids in specs
hardcoded ids are unreliable for running specs and lead to erratic failures
This commit is contained in:
@@ -8,9 +8,9 @@ describe Jobs::BulkInvite do
|
||||
fab!(:admin) { Fabricate(:admin) }
|
||||
fab!(:group1) { Fabricate(:group, name: 'group1') }
|
||||
fab!(:group2) { Fabricate(:group, name: 'group2') }
|
||||
fab!(:topic) { Fabricate(:topic, id: 999) }
|
||||
fab!(:topic) { Fabricate(:topic) }
|
||||
let(:email) { "test@discourse.org" }
|
||||
let(:invites) { [{ email: 'test2@discourse.org' }, { email: 'test@discourse.org', groups: 'GROUP1;group2', topic_id: 999 }] }
|
||||
let(:invites) { [{ email: 'test2@discourse.org' }, { email: 'test@discourse.org', groups: 'GROUP1;group2', topic_id: topic.id }] }
|
||||
|
||||
it 'raises an error when the invites array is missing' do
|
||||
expect { Jobs::BulkInvite.new.execute(current_user_id: user.id) }
|
||||
|
||||
Reference in New Issue
Block a user