16 lines
398 B
Ruby
16 lines
398 B
Ruby
![]() |
require 'rails_helper'
|
||
|
|
||
|
RSpec.describe NotificationSetting, type: :model do
|
||
|
describe "Associations" do
|
||
|
it { is_expected.to belong_to(:user) }
|
||
|
end
|
||
|
|
||
|
describe "Validation" do
|
||
|
subject { NotificationSetting.new }
|
||
|
|
||
|
it { is_expected.to validate_presence_of(:user) }
|
||
|
it { is_expected.to validate_presence_of(:source) }
|
||
|
it { is_expected.to validate_presence_of(:level) }
|
||
|
end
|
||
|
end
|