From d601d8643f4dfd54c1ca1aaad22c877c66821b7a Mon Sep 17 00:00:00 2001 From: Absurdon Date: Wed, 6 Dec 2017 22:20:55 +0100 Subject: [PATCH] Fixing Tests --- app/models/user.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index b27fe83..f3c85c8 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -229,7 +229,11 @@ class User < ActiveRecord::Base end def received_messages - received_personal_messages + team.received_messages + received_personal_messages + received_team_messages + end + + def received_team_messages + Message.where(recipient_id: team_id, recipient_type: 'Team' ) end def sent_messages