2019-04-28 21:10:54 +03:00
|
|
|
require "rails_helper"
|
2015-04-17 02:01:28 +03:00
|
|
|
|
|
|
|
RSpec.describe Proposition, type: :model do
|
2019-04-28 21:10:54 +03:00
|
|
|
it "belongs to a proposer" do
|
2015-04-17 02:01:28 +03:00
|
|
|
user = create :user
|
|
|
|
expect(create(:proposition, proposer: user).proposer).to eq user
|
|
|
|
end
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
it "belongs to a proposable" do
|
2015-04-17 02:01:28 +03:00
|
|
|
event = create :event
|
|
|
|
expect(create(:proposition, proposable: event).proposable).to eq event
|
|
|
|
end
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
it "is invalid without an existing proposable"
|
2015-04-17 02:01:28 +03:00
|
|
|
end
|