diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-17 14:26:17 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-17 14:26:17 +0000 |
commit | c84b94a647fb4c068e8be9d0495ff7284f41f168 (patch) | |
tree | d969c75c764436c0478234233597e38e1e29c2d5 /spec/models/event_spec.rb |
Initial
Diffstat (limited to 'spec/models/event_spec.rb')
-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 |