Add more coverage for model validations and associations
This commit is contained in:
parent
2bdea8651f
commit
97423a0bed
12 changed files with 96 additions and 50 deletions
|
@ -7,7 +7,11 @@ describe UsersProject do
|
|||
end
|
||||
|
||||
describe "Validation" do
|
||||
let!(:users_project) { create(:users_project) }
|
||||
|
||||
it { should validate_presence_of(:user_id) }
|
||||
it { should validate_uniqueness_of(:user_id).scoped_to(:project_id) }
|
||||
|
||||
it { should validate_presence_of(:project_id) }
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue