stores a proposal notification

This commit is contained in:
rgarcia
2016-06-01 13:30:44 +02:00
parent 1975018d6a
commit f5375e813d
14 changed files with 155 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
require 'rails_helper'
describe ProposalNotification do
let(:notification) { build(:proposal_notification) }
it "should be valid" do
expect(notification).to be_valid
end
it "should not be valid without a title" do
notification.title = nil
expect(notification).to_not be_valid
end
it "should not be valid without a body" do
notification.body = nil
expect(notification).to_not be_valid
end
it "should not be valid without an associated proposal" do
notification.proposal = nil
expect(notification).to_not be_valid
end
end