Fix test with create scopes.

The tests was wrong, because it do not iterate on values of the enumeration.