add user cant follow himself validation

This commit is contained in:
João Victor Geonizeli
2022-02-27 16:23:25 -03:00
parent 70e25e8399
commit 53c7d35d74
3 changed files with 26 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
FactoryBot.define do
factory :user do
username { Faker::Internet.username.gsub(/[^0-9a-z ]/i, '') }
username {
Faker::Internet.username[0..14]
.gsub(/[^0-9a-z ]/i, '')
}
end
end