Adds new phases to budget and fixes specs

This commit is contained in:
kikito
2016-12-30 18:43:15 +01:00
parent 181749b4f6
commit fa50e3f215
6 changed files with 47 additions and 15 deletions

View File

@@ -318,8 +318,8 @@ describe Budget::Investment do
expect(investment.reason_for_not_being_ballotable_by(user, ballot)).to eq(:organization)
end
it "rejects votes when voting is not allowed (via admin setting)" do
budget.phase = "on_hold"
it "rejects votes when voting is not allowed (wrong phase)" do
budget.phase = "reviewing"
expect(investment.reason_for_not_being_ballotable_by(user, ballot)).to eq(:no_ballots_allowed)
end

View File

@@ -15,18 +15,24 @@ describe Budget do
end
it "produces auxiliary methods" do
budget.phase = "on_hold"
expect(budget).to be_on_hold
budget.phase = "accepting"
expect(budget).to be_accepting
budget.phase = "reviewing"
expect(budget).to be_reviewing
budget.phase = "selecting"
expect(budget).to be_selecting
budget.phase = "valuating"
expect(budget).to be_valuating
budget.phase = "balloting"
expect(budget).to be_balloting
budget.phase = "reviewing_ballots"
expect(budget).to be_reviewing_ballots
budget.phase = "finished"
expect(budget).to be_finished
end