File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 101101 allow ( exception ) . to receive ( :backtrace ) . and_return ( [ "" ] )
102102 allow ( WorkGroup ) . to receive ( :find_by_id ) . and_return ( User . all_admins . map ( &:own_group ) . compact )
103103 Message . send_internal_error_message ( "" , "head" , exception )
104- end . to change { Message . count } . by ( User . all_admins . map ( &:own_group ) . compact . count )
104+ end . to change { Message . count } . by ( User . all_admins . map ( &:own_group ) . uniq . size )
105105 end
106106
107107 it "send a message to all users and admin (admin + normal user)" do
111111 allow ( exception ) . to receive ( :backtrace ) . and_return ( [ "" ] )
112112 allow ( WorkGroup ) . to receive ( :find_by_id ) . and_return ( User . all_admins . map ( &:own_group ) . compact )
113113 Message . send_internal_error_message ( users , "head" , exception )
114- end . to change { Message . count } . by ( User . all_admins . map ( &:own_group ) . compact . count + users . size )
114+ end . to change { Message . count } . by ( User . all_admins . map ( &:own_group ) . uniq . size + users . size )
115115 end
116116
117117 end
You can’t perform that action at this time.
0 commit comments