Merge pull request #66 from discourse/rails_5_1_upgrade
Make tests work with Rails 5.1.
This commit is contained in:
commit
2fb85561bc
|
@ -16,7 +16,7 @@ RSpec.describe "Managing Posts solved status" do
|
|||
end
|
||||
|
||||
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")
|
||||
|
||||
|
@ -29,7 +29,7 @@ RSpec.describe "Managing Posts solved status" do
|
|||
end
|
||||
it 'does not set a timer when the topic is closed' do
|
||||
topic.update!(closed: true)
|
||||
xhr :post, "/solution/accept", id: p1.id
|
||||
post "/solution/accept.json", params: { id: p1.id }
|
||||
p1.reload
|
||||
topic.reload
|
||||
|
||||
|
|
Loading…
Reference in New Issue