Skip to content

Commit

Permalink
Fixed CI tests for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
prioux committed Jul 21, 2024
1 parent 13cf07d commit fd9c1fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BrainPortal/spec/models/message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
allow(exception).to receive(:backtrace).and_return([""])
allow(WorkGroup).to receive(:find_by_id).and_return(User.all_admins.map(&:own_group).compact)
Message.send_internal_error_message("","head", exception)
end.to change { Message.count }.by(User.all_admins.map(&:own_group).compact.count)
end.to change { Message.count }.by(User.all_admins.map(&:own_group).uniq.size)
end

it "send a message to all users and admin (admin + normal user)" do
Expand All @@ -111,7 +111,7 @@
allow(exception).to receive(:backtrace).and_return([""])
allow(WorkGroup).to receive(:find_by_id).and_return(User.all_admins.map(&:own_group).compact)
Message.send_internal_error_message(users,"head", exception)
end.to change { Message.count }.by(User.all_admins.map(&:own_group).compact.count + users.size)
end.to change { Message.count }.by(User.all_admins.map(&:own_group).uniq.size + users.size)
end

end
Expand Down

0 comments on commit fd9c1fd

Please sign in to comment.