diff options
author | Andrey Kumanyaev <me@zzet.org> | 2013-01-19 21:53:03 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-25 00:31:24 +0400 |
commit | 17e9207dff39374ae33574b19123d1a1320fff4c (patch) | |
tree | 5259f7a24f6f2a3fe49f47f078f9c57baf9f236d /spec | |
parent | 3a0d4865f63fd078b54436864c201a7c41a9ddf9 (diff) |
add user team factories
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/user_team_project_relationships.rb | 9 | ||||
-rw-r--r-- | spec/factories/user_team_user_relationships.rb | 10 | ||||
-rw-r--r-- | spec/factories/user_teams.rb | 9 |
3 files changed, 28 insertions, 0 deletions
diff --git a/spec/factories/user_team_project_relationships.rb b/spec/factories/user_team_project_relationships.rb new file mode 100644 index 00000000000..fa0f26e7455 --- /dev/null +++ b/spec/factories/user_team_project_relationships.rb @@ -0,0 +1,9 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :user_team_project_relationship do + project_id 1 + user_team_id 1 + greatest_access 1 + end +end diff --git a/spec/factories/user_team_user_relationships.rb b/spec/factories/user_team_user_relationships.rb new file mode 100644 index 00000000000..9b655e00686 --- /dev/null +++ b/spec/factories/user_team_user_relationships.rb @@ -0,0 +1,10 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :user_team_user_relationship do + user_id 1 + user_team_id 1 + group_admin false + permission 1 + end +end diff --git a/spec/factories/user_teams.rb b/spec/factories/user_teams.rb new file mode 100644 index 00000000000..f4fe45cbb8a --- /dev/null +++ b/spec/factories/user_teams.rb @@ -0,0 +1,9 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :user_team do + sequence(:name) { |n| "team#{n}" } + path { name.downcase.gsub(/\s/, '_') } + owner + end +end |