decidim-proposals/spec/features/proposals_spec.rb in decidim-0.5.1 vs decidim-proposals/spec/features/proposals_spec.rb in decidim-0.6.0
- old
+ new
@@ -4,11 +4,11 @@
describe "Proposals", type: :feature do
include_context "feature"
let(:manifest_name) { "proposals" }
- let!(:category) { create :category, participatory_process: participatory_process }
+ let!(:category) { create :category, participatory_space: participatory_process }
let!(:scope) { create :scope, organization: participatory_process.organization }
let!(:user) { create :user, :confirmed, organization: participatory_process.organization }
let(:address) { "Carrer Pare Llaurador 113, baixos, 08224 Terrassa" }
let(:latitude) { 40.1234 }
@@ -30,11 +30,11 @@
context "with creation enabled" do
let!(:feature) do
create(:proposal_feature,
:with_creation_enabled,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
context "when process is not related to any scope" do
before do
participatory_process.update_attributes(scope: nil)
@@ -91,11 +91,11 @@
let!(:feature) do
create(:proposal_feature,
:with_creation_enabled,
:with_geocoding_enabled,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
it "creates a new proposal" do
visit_feature
click_link "New proposal"
@@ -156,11 +156,11 @@
let!(:feature) do
create(:proposal_feature,
:with_creation_enabled,
:with_geocoding_enabled,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
it "creates a new proposal as a user group" do
visit_feature
click_link "New proposal"
@@ -206,11 +206,11 @@
let!(:feature) do
create(:proposal_feature,
:with_creation_enabled,
:with_attachments_allowed,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
it "creates a new proposal with attachments" do
visit_feature
@@ -244,11 +244,11 @@
context "viewing a single proposal" do
let!(:feature) do
create(:proposal_feature,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
let!(:proposals) { create_list(:proposal, 3, feature: feature) }
it "allows viewing a single proposal" do
@@ -318,11 +318,11 @@
end
context "when a proposal has been linked in a meeting" do
let(:proposal) { create(:proposal, feature: feature) }
let(:meeting_feature) do
- create(:feature, manifest_name: :meetings, participatory_process: proposal.feature.participatory_process)
+ create(:feature, manifest_name: :meetings, participatory_space: proposal.feature.participatory_space)
end
let(:meeting) { create(:meeting, feature: meeting_feature) }
before do
meeting.link_resources([proposal], "proposals_from_meeting")
@@ -337,11 +337,11 @@
end
context "when a proposal has been linked in a result" do
let(:proposal) { create(:proposal, feature: feature) }
let(:result_feature) do
- create(:feature, manifest_name: :results, participatory_process: proposal.feature.participatory_process)
+ create(:feature, manifest_name: :results, participatory_space: proposal.feature.participatory_space)
end
let(:result) { create(:result, feature: result_feature) }
before do
result.link_resources([proposal], "included_proposals")
@@ -410,15 +410,15 @@
context "when a proposal has been linked in a project" do
let(:feature) do
create(:proposal_feature,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
let(:proposal) { create(:proposal, feature: feature) }
let(:budget_feature) do
- create(:feature, manifest_name: :budgets, participatory_process: proposal.feature.participatory_process)
+ create(:feature, manifest_name: :budgets, participatory_space: proposal.feature.participatory_space)
end
let(:project) { create(:project, feature: budget_feature) }
before do
project.link_resources([proposal], "included_proposals")
@@ -448,11 +448,11 @@
end
it "lists all the proposals" do
create(:proposal_feature,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
create_list(:proposal, 3, feature: feature)
visit_feature
expect(page).to have_css(".card--proposal", count: 3)
@@ -465,11 +465,11 @@
context "when voting phase is over" do
let!(:feature) do
create(:proposal_feature,
:with_votes_blocked,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
let!(:most_voted_proposal) do
proposal = create(:proposal, feature: feature)
create_list(:proposal_vote, 3, proposal: proposal)
@@ -495,11 +495,11 @@
context "when voting is disabled" do
let!(:feature) do
create(:proposal_feature,
:with_votes_disabled,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
describe "order" do
it_behaves_like "a random proposal ordering"
end
@@ -664,11 +664,11 @@
context "when proposal_answering step setting is enabled" do
before do
feature.update_attributes(
step_settings: {
- feature.participatory_process.active_step.id => {
+ feature.participatory_space.active_step.id => {
proposal_answering_enabled: true
}
}
)
end
@@ -720,11 +720,11 @@
context "when proposal_answering step setting is disabled" do
before do
feature.update_attributes(
step_settings: {
- feature.participatory_process.active_step.id => {
+ feature.participatory_space.active_step.id => {
proposal_answering_enabled: false
}
}
)
end
@@ -777,10 +777,10 @@
context "by 'most_voted'" do
let!(:feature) do
create(:proposal_feature,
:with_votes_enabled,
manifest: manifest,
- participatory_process: participatory_process)
+ participatory_space: participatory_process)
end
it "lists the proposals ordered by votes" do
most_voted_proposal = create(:proposal, feature: feature)
create_list(:proposal_vote, 3, proposal: most_voted_proposal)