Files
grecia/spec/models/follow_spec.rb
2017-07-07 12:07:25 +02:00

27 lines
543 B
Ruby

require 'rails_helper'
describe Follow do
let(:follow) { build(:follow, :followed_proposal) }
it "should be valid" do
expect(follow).to be_valid
end
it "should not be valid without an user_id" do
follow.user_id = nil
expect(follow).to_not be_valid
end
it "should not be valid without an followable_id" do
follow.followable_id = nil
expect(follow).to_not be_valid
end
it "should not be valid without an followable_type" do
follow.followable_type = nil
expect(follow).to_not be_valid
end
end