diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/event_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb new file mode 100644 index 0000000..adf288a --- /dev/null +++ b/spec/models/event_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +RSpec.describe Event, type: :model do + it "is invalid without a name" do + e = Event.new(name: "") + expect(e).to_not be_valid + end + + describe "validations" do + it "is invalid without a date" do + e = Event.new(date: nil, name: "Sludge") + expect(e).to_not be_valid + end + end +end |