1
0
mirror of synced 2026-08-06 02:07:06 +00:00

Make tests work with Rails 5.1.

This commit is contained in:
Guo Xiang Tan
2017-09-01 10:42:31 +08:00
parent 38208b4600
commit e49238b1f5
+2 -2
View File
@@ -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