diff --git a/spec/models/permission_spec.rb b/spec/models/permission_spec.rb index 60a4277..359b193 100644 --- a/spec/models/permission_spec.rb +++ b/spec/models/permission_spec.rb @@ -1,5 +1,15 @@ require 'spec_helper' describe Permission do - pending "add some examples to (or delete) #{__FILE__}" + include_context "data" + + it "validates selfness" do + permission.user_id = permission.domain.user_id + permission.should have(1).error_on(:user) + end + + it "validates unexsisting email" do + permission.user_email = "does.not@exist.in.db" + permission.should have(1).error_on(:user) + end end