aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/event_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/event_spec.rb')
-rw-r--r--spec/models/event_spec.rb15
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