If they are in an enclosed run it might be different but my free rangers have all weeds and plants around them, including ivy, veggie plants, dock etc all around them everyday ..... no poisoning. Think they usually know what is safe to eat .... think about chickens in any farmyard. I suppose in a run they might be more inclined to pick at undesirable plants but in my experience they soon trample everything to oblivion in a fixed run in a very short time anyway.
Was horrified when I looked out to see that mine had once stripped all the rhubarb leaves .... thought they were bound to pop their clogs. They were fine. Read later that it is believed that chickens can use plants containing toxins to self-medicate. It noted rhubarb leaves as an example and said that they often gobbled them in spring when toxins were at low levels to self-medicate .... against internal parasites for example.
I think that in general they know what they should and shouldn't eat.