From 8a12eb464e61604528d30a4db81e2b07061507d3 Mon Sep 17 00:00:00 2001 From: Heiko Bernloehr Date: Wed, 28 Feb 2018 13:19:27 +0100 Subject: Solve deprecation warning in test case. --- test/controllers/messages_controller_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/controllers/messages_controller_test.rb b/test/controllers/messages_controller_test.rb index 0005352..79d8190 100644 --- a/test/controllers/messages_controller_test.rb +++ b/test/controllers/messages_controller_test.rb @@ -226,7 +226,7 @@ public assert_response 200 assert MembershipMessage.where(:message_id => messages(:numlab_ex1)).count == refscount - 1 # message is only tagged as removed (events on). physically it's still there. - assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ex1)) } + assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ex1).id) } # This destroy is processed as role "sender", because the receiver quueue of the sender # participant is now empty. Therefore all receiver references were deleted. myrequest("post", :destroy, @@ -241,7 +241,7 @@ public assert_response 404 assert_equal 0, MembershipMessage.where(:message_id => messages(:numlab_ex1)).count # message is only tagged as removed (events on). physically it's still there. - assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ex1)) } + assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ex1).id) } end test "delete_postrouted_message_as_owner_with_references_in_place" do @@ -258,7 +258,7 @@ public assert_response 404 assert_equal 0, MembershipMessage.where(:message_id => messages(:numlab_ulm_ex1)).count # message is only tagged as removed (events on). physically it's still there. - assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ulm_ex1)) } + assert_nothing_raised(ActiveRecord::RecordNotFound) { Message.find(messages(:numlab_ulm_ex1).id) } end test "delete_postrouted_message_as_none_owner_with_references_in_place" do -- cgit v1.2.3