# This is a workaround to avoid the user creating another namespace via# User#ensure_namespace_correct. We should try to remove it and then# we could remove this workaroundassociation:owner,factory: :user,strategy: :buildbefore(:create)do|namespace|owner=namespace.ownerifowner# We're changing the username here because we want to keep our path,# and User#ensure_namespace_correct would change the path based on# username, so we're forced to do this otherwise we'll need to change# a lot of existing tests.owner.username=namespace.pathowner.namespace=namespaceendend