Merge pull request #1434 from consul/valuation-tags

displays only valuation tags for filtering
This commit is contained in:
Enrique García
2017-03-07 19:14:44 +01:00
committed by GitHub
3 changed files with 20 additions and 1 deletions

View File

@@ -252,6 +252,21 @@ feature 'Admin budget investments' do
expect(page).to have_content("More schools")
end
scenario "Filtering by tag, display only valuation tags" do
investment1 = create(:budget_investment, budget: @budget, tag_list: 'Education')
investment2 = create(:budget_investment, budget: @budget, tag_list: 'Health')
investment1.set_tag_list_on(:valuation, 'Teachers')
investment2.set_tag_list_on(:valuation, 'Hospitals')
investment1.save
investment2.save
visit admin_budget_budget_investments_path(budget_id: @budget.id)
expect(page).to have_select("tag_name", options: ["All tags", "Hospitals", "Teachers"])
end
end
scenario 'Show' do