Fix all the errors to get our tests green on Rails 5.1.

This commit is contained in:
Guo Xiang Tan
2017-08-31 12:06:56 +08:00
parent 898ee93547
commit 77d4c4d8dc
989 changed files with 5114 additions and 3117 deletions

View File

@ -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)