clarion/spec/models/proposition_spec.rb
2015-08-14 23:58:51 +03:00

16 lines
395 B
Ruby

require 'rails_helper'
RSpec.describe Proposition, type: :model do
it 'belongs to a proposer' do
user = create :user
expect(create(:proposition, proposer: user).proposer).to eq user
end
it 'belongs to a proposable' do
event = create :event
expect(create(:proposition, proposable: event).proposable).to eq event
end
it 'is invalid without an existing proposable'
end