Skip to content

Commit

Permalink
Improve dev fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
  • Loading branch information
dzaporozhets committed Dec 25, 2013
1 parent 1e64333 commit 34f994b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/models/project_team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def truncate
UsersProject.truncate_team(project)
end

def users
members
end

def members
@members ||= fetch_members
end
Expand Down
2 changes: 1 addition & 1 deletion db/fixtures/development/05_users.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Gitlab::Seeder.quiet do
(2..50).each do |i|
(2..10).each do |i|
begin
User.seed(:id, [{
id: i,
Expand Down
2 changes: 1 addition & 1 deletion db/fixtures/development/09_issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
project = Project.all.sample

# Random user
user = project.users.sample
user = project.team.users.sample

next unless user

Expand Down
2 changes: 1 addition & 1 deletion db/fixtures/development/10_merge_requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
project = Project.all.sample

# Random user
user = project.users.sample
user = project.team.users.sample

next unless user

Expand Down

0 comments on commit 34f994b

Please sign in to comment.