Implement UsersProject project_access validation

This commit is contained in:
Dmitriy Zaporozhets 2012-12-22 19:52:28 +02:00
parent 640018ba55
commit 1ba28aaef8
6 changed files with 8 additions and 5 deletions

View file

@ -29,6 +29,7 @@ describe UsersProject do
it { should validate_uniqueness_of(:user_id).scoped_to(:project_id).with_message(/already exists/) }
it { should validate_presence_of(:project) }
it { should ensure_inclusion_of(:project_access).in_array(UsersProject.access_roles.values) }
end
describe "Delegate methods" do