|
@@ -6,6 +6,15 @@ JoinedUserActivity.delete_all
|
6
|
6
|
JoinedUserActivity.reset_pk_sequence
|
7
|
7
|
Task.delete_all
|
8
|
8
|
Task.reset_pk_sequence
|
|
9
|
+Team.delete_all
|
|
10
|
+Team.reset_pk_sequence
|
|
11
|
+JoinedTeamUser.delete_all
|
|
12
|
+JoinedTeamUser.reset_pk_sequence
|
|
13
|
+
|
|
14
|
+3.times do |i|
|
|
15
|
+ team = Team.create(name: Faker::Company.name, description: Faker::Company.catch_phrase)
|
|
16
|
+ puts "Created TEAM ##{i} - #{team.name}"
|
|
17
|
+end
|
9
|
18
|
|
10
|
19
|
10.times do |i|
|
11
|
20
|
name = Faker::Name.first_name.downcase
|
|
@@ -27,6 +36,11 @@ Task.reset_pk_sequence
|
27
|
36
|
)
|
28
|
37
|
puts "Created ASSOCIATION ##{joined_user_activity.id}"
|
29
|
38
|
end
|
|
39
|
+
|
|
40
|
+ joined_team_users = JoinedTeamUser.create!(
|
|
41
|
+ user_id: user.id,
|
|
42
|
+ team_id: Team.all.sample.id
|
|
43
|
+ )
|
30
|
44
|
end
|
31
|
45
|
|
32
|
46
|
User.create! username: "admin", email: "admin@email.com", password: "azerty", is_admin: true
|