Permalink
Browse files

Change permissions and roles

  • Loading branch information...
wicz committed Mar 18, 2012
1 parent 6f7bcb3 commit 597704cf059511a11e22fd3ddc9189e2daaa17b0
Showing with 9 additions and 11 deletions.
  1. +9 −11 test/factories/people.rb
View
@@ -11,25 +11,23 @@
permissions Hash[[["Clubhouse", "Administrator"],
["Community", "Administrator"],
["Liskov", "Administrator"]]]
+ end
+ factory :instructor, parent: "person" do
+ github_nickname "instructor"
course_membership {
FactoryGirl.create(:course_membership, course: course,
person_github_nickname: "#{github_nickname}",
- role: "#{permissions['Liskov']}") if course
+ role: "Instructor") if course
}
end
- factory :instructor, parent: "person" do
- github_nickname "instructor"
- permissions Hash[[["Clubhouse", "Instructor"],
- ["Community", "Instructor"],
- ["Liskov", "Instructor"]]]
- end
-
factory :student, parent: "person" do
github_nickname "student"
- permissions Hash[[["Clubhouse", "Student"],
- ["Community", "Student"],
- ["Liskov", "Student"]]]
+ course_membership {
+ FactoryGirl.create(:course_membership, course: course,
+ person_github_nickname: "#{github_nickname}",
+ role: "Student") if course
+ }
end
end

0 comments on commit 597704c

Please sign in to comment.