mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
Fix all the errors to get our tests green on Rails 5.1.
This commit is contained in:
@ -8,10 +8,6 @@ describe "Discobot welcome post" do
|
||||
SiteSetting.discourse_narrative_bot_enabled = true
|
||||
end
|
||||
|
||||
after do
|
||||
Jobs::NarrativeInit.jobs.clear
|
||||
end
|
||||
|
||||
context 'when discourse_narrative_bot_welcome_post_delay is 0' do
|
||||
it 'should not delay the welcome post' do
|
||||
user
|
||||
@ -38,10 +34,11 @@ describe "Discobot welcome post" do
|
||||
invite
|
||||
|
||||
expect do
|
||||
xhr :put, "/invites/show/#{invite.invite_key}",
|
||||
put "/invites/show/#{invite.invite_key}.json", params: {
|
||||
username: 'somename',
|
||||
name: 'testing',
|
||||
password: 'asodaasdaosdhq'
|
||||
}
|
||||
end.to change { User.count }.by(1)
|
||||
|
||||
expect(Jobs::NarrativeInit.jobs.first["args"].first["user_id"]).to eq(User.last.id)
|
||||
|
Reference in New Issue
Block a user