Skip to content

Commit fd9c1fd

Browse files
committed
Fixed CI tests for messages
1 parent 13cf07d commit fd9c1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BrainPortal/spec/models/message_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
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
@@ -111,7 +111,7 @@
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

0 commit comments

Comments
 (0)