Add reminder feature
This commit is contained in:
17
spec/models/reminder_spec.rb
Normal file
17
spec/models/reminder_spec.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Reminder, type: :model do
|
||||
subject { build(:reminder) }
|
||||
|
||||
describe 'validations' do
|
||||
%w[title body date].each do |attribute|
|
||||
describe attribute do
|
||||
it 'must be present' do
|
||||
expect(subject).to be_valid
|
||||
subject[attribute] = nil
|
||||
expect(subject).to_not be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user