Make valuator spec 100 LineLength compliant

Readability of the code is important
This commit is contained in:
Bertocq
2018-03-06 11:22:35 +01:00
parent 7145ce5e5a
commit a92ef57bf8

View File

@@ -13,7 +13,9 @@ feature 'Valuation budget investments' do
scenario 'Disabled with a feature flag' do
Setting['feature.budgets'] = nil
expect{ visit valuation_budget_budget_investments_path(create(:budget)) }.to raise_exception(FeatureFlags::FeatureDisabled)
expect{
visit valuation_budget_budget_investments_path(create(:budget))
}.to raise_exception(FeatureFlags::FeatureDisabled)
Setting['feature.budgets'] = true
end
@@ -68,8 +70,10 @@ feature 'Valuation budget investments' do
group = create(:budget_group, budget: budget)
heading1 = create(:budget_heading, name: "District 9", group: group)
heading2 = create(:budget_heading, name: "Down to the river", group: group)
investment1 = create(:budget_investment, title: "Realocate visitors", heading: heading1, group: group, budget: budget)
investment2 = create(:budget_investment, title: "Destroy the city", heading: heading2, group: group, budget: budget)
investment1 = create(:budget_investment, title: "Realocate visitors", heading: heading1,
group: group, budget: budget)
investment2 = create(:budget_investment, title: "Destroy the city", heading: heading2,
group: group, budget: budget)
investment1.valuators << valuator
investment2.valuators << valuator
@@ -119,7 +123,8 @@ feature 'Valuation budget investments' do
scenario "Index filtering by valuation status" do
valuating = create(:budget_investment, budget: budget, title: "Ongoing valuation")
valuated = create(:budget_investment, budget: budget, title: "Old idea", valuation_finished: true)
valuated = create(:budget_investment, budget: budget, title: "Old idea",
valuation_finished: true)
valuating.valuators << valuator
valuated.valuators << valuator
@@ -140,7 +145,7 @@ feature 'Valuation budget investments' do
end
feature 'Show' do
let(:administrator) do
let(:administrator) do
create(:administrator, user: create(:user, username: 'Ana', email: 'ana@admins.org'))
end
let(:second_valuator) do
@@ -201,7 +206,9 @@ feature 'Valuation budget investments' do
logout
login_as create(:valuator).user
expect { visit valuation_budget_budget_investment_path(budget, investment) }.to raise_error "Not Found"
expect{
visit valuation_budget_budget_investment_path(budget, investment)
}.to raise_error "Not Found"
end
end
@@ -275,7 +282,8 @@ feature 'Valuation budget investments' do
end
scenario 'Feasibility selection makes proper fields visible', :js do
feasible_fields = ['Price (€)', 'Cost during the first year (€)', 'Price explanation', 'Time scope']
feasible_fields = ['Price (€)', 'Cost during the first year (€)', 'Price explanation',
'Time scope']
unfeasible_fields = ['Feasibility explanation']
any_feasibility_fields = ['Valuation finished']
undecided_fields = feasible_fields + unfeasible_fields + any_feasibility_fields