Use correct variable name

This commit is contained in:
romanrizzi 2019-11-14 17:46:20 -03:00
parent 067696df8f
commit f87d38fc7c

View File

@ -8,16 +8,16 @@ RSpec.describe Jobs::SendAdvancedTutorialMessage do
it 'sends a message to the promoted user' do
user = Fabricate(:user)
discobot_user = Discourse.system_user
system_user = Discourse.system_user
Jobs.enqueue(:send_advanced_tutorial_message, user_id: user.id)
topic = Topic.last
expect(topic).not_to be_nil
expect(topic.user).to eq(discobot_user)
expect(topic.user).to eq(system_user)
expect(topic.archetype).to eq(Archetype.private_message)
expect(topic.topic_allowed_users.pluck(:user_id)).to contain_exactly(
discobot_user.id, user.id
system_user.id, user.id
)
end
end