Use object instead of id for validation
This commit is contained in:
parent
9fdd372f18
commit
6a9c205567
2 changed files with 1 additions and 5 deletions
|
|
@ -9,9 +9,5 @@ describe Vote do
|
|||
|
||||
describe 'validation' do
|
||||
it { is_expected.to validate_uniqueness_of(:user_id).scoped_to(:event_id) }
|
||||
|
||||
it 'has a valid factory' do
|
||||
expect(build(:vote)).to be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue