God had told Adam not to eat from this tree before Eve was made. So Eve has taken Adam’s word that God said this.
This was the first time the Serpent set a test. Unfortunately Adam and Eve failed the test.
God acted appropriately afterwards. He would have been very disappointed and could have done so much more. But as we read later, he cared and clothed them.
“The woman said to the serpent, “We may eat fruit from the trees in the garden, but God did say, ‘You must not eat fruit from the tree that is in the middle of the garden, and you must not touch it, or you will die.’ ””Genesis 3:2-3 NIV http://bible.com/111/gen.3.2-3.niv