From 17e9207dff39374ae33574b19123d1a1320fff4c Mon Sep 17 00:00:00 2001 From: Andrey Kumanyaev Date: Sat, 19 Jan 2013 21:53:03 +0400 Subject: [PATCH] add user team factories --- spec/factories/user_team_project_relationships.rb | 9 +++++++++ spec/factories/user_team_user_relationships.rb | 10 ++++++++++ spec/factories/user_teams.rb | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 spec/factories/user_team_project_relationships.rb create mode 100644 spec/factories/user_team_user_relationships.rb create mode 100644 spec/factories/user_teams.rb diff --git a/spec/factories/user_team_project_relationships.rb b/spec/factories/user_team_project_relationships.rb new file mode 100644 index 00000000..fa0f26e7 --- /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 00000000..9b655e00 --- /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 00000000..f4fe45cb --- /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