24 lines
485 B
Ruby
24 lines
485 B
Ruby
require 'rails_helper'
|
|
|
|
describe DayLog, type: :model do
|
|
subject { build(:day_log) }
|
|
|
|
it { is_expected.to be_valid }
|
|
|
|
describe "validations" do
|
|
it "is invalid without a day" do
|
|
subject.day = nil
|
|
expect(subject).not_to be_valid
|
|
end
|
|
|
|
it "is invalid without info" do
|
|
subject.info = nil
|
|
expect(subject).not_to be_valid
|
|
end
|
|
|
|
it "is invalid without a user" do
|
|
subject.user = nil
|
|
expect(subject).not_to be_valid
|
|
end
|
|
end
|
|
end
|