Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1029 from mssola/fix-generator
Browse files Browse the repository at this point in the history
bin: fixed test data generator
  • Loading branch information
monstermunchkin authored Aug 10, 2016
2 parents 4b2f3bf + 45dffc5 commit d03cbb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/generate_test_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ def create_teams_and_namespaces!
)

rand(2..5).times do
name = FFaker::Food.ingredient.downcase.gsub(/[^#{User::USERNAME_CHARS}]/, "")
name = FFaker::Food.ingredient.downcase.gsub(/[^#{Namespace::NAME_REGEXP}]/, "")
name += rand(0..1000).to_s

Namespace.create!(
name: name,
team: t,
public: rand(0..1) == 1,
registry: Registry.get
name: name,
team: t,
visibility: Namespace.visibilities.values.sample,
registry: Registry.get
)
end
end
Expand Down

0 comments on commit d03cbb9

Please sign in to comment.