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 101
101
allow ( exception ) . to receive ( :backtrace ) . and_return ( [ "" ] )
102
102
allow ( WorkGroup ) . to receive ( :find_by_id ) . and_return ( User . all_admins . map ( &:own_group ) . compact )
103
103
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 )
105
105
end
106
106
107
107
it "send a message to all users and admin (admin + normal user)" do
111
111
allow ( exception ) . to receive ( :backtrace ) . and_return ( [ "" ] )
112
112
allow ( WorkGroup ) . to receive ( :find_by_id ) . and_return ( User . all_admins . map ( &:own_group ) . compact )
113
113
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 )
115
115
end
116
116
117
117
end
You can’t perform that action at this time.
0 commit comments