dawarich/spec/models/visit_spec.rb

17 lines
421 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2024-07-21 14:32:29 -04:00
require 'rails_helper'
RSpec.describe Visit, type: :model do
describe 'associations' do
2024-08-12 16:18:11 -04:00
it { is_expected.to belong_to(:area).optional }
it { is_expected.to belong_to(:place).optional }
it { is_expected.to belong_to(:user) }
it { is_expected.to have_many(:points).dependent(:nullify) }
end
describe 'factory' do
it { expect(build(:visit)).to be_valid }
end
2024-07-21 14:32:29 -04:00
end