fixes specs
This commit is contained in:
@@ -183,6 +183,7 @@ FactoryGirl.define do
|
||||
factory :spending_proposal do
|
||||
sequence(:title) { |n| "Spending Proposal #{n} title" }
|
||||
description 'Spend money on this'
|
||||
feasible_explanation 'This proposal is not viable because...'
|
||||
external_url 'http://external_documention.org'
|
||||
terms_of_service '1'
|
||||
association :author, factory: :user
|
||||
|
||||
@@ -44,11 +44,13 @@ describe SpendingProposal do
|
||||
|
||||
describe "#feasible_explanation" do
|
||||
it "should be valid if valuation not finished" do
|
||||
spending_proposal.feasible_explanation = ""
|
||||
spending_proposal.valuation_finished = false
|
||||
expect(spending_proposal).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid if valuation finished" do
|
||||
spending_proposal.feasible_explanation = ""
|
||||
spending_proposal.valuation_finished = true
|
||||
expect(spending_proposal).to_not be_valid
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user