Merge pull request #66 from discourse/rails_5_1_upgrade

Make tests work with Rails 5.1.
This commit is contained in:
Guo Xiang Tan 2017-09-25 11:04:20 +08:00 committed by GitHub
commit 2fb85561bc
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ RSpec.describe "Managing Posts solved status" do
end end
it 'can mark a post as the accepted answer correctly' do it 'can mark a post as the accepted answer correctly' do
xhr :post, "/solution/accept", id: p1.id post "/solution/accept.json", params: { id: p1.id }
expect(p1.reload.custom_fields["is_accepted_answer"]).to eq("true") expect(p1.reload.custom_fields["is_accepted_answer"]).to eq("true")
@ -29,7 +29,7 @@ RSpec.describe "Managing Posts solved status" do
end end
it 'does not set a timer when the topic is closed' do it 'does not set a timer when the topic is closed' do
topic.update!(closed: true) topic.update!(closed: true)
xhr :post, "/solution/accept", id: p1.id post "/solution/accept.json", params: { id: p1.id }
p1.reload p1.reload
topic.reload topic.reload