From cc891b4f30b1a1d08b14ab1f139d56a7ad90e93d Mon Sep 17 00:00:00 2001 From: rgarcia Date: Mon, 9 Jan 2017 14:10:07 +0100 Subject: [PATCH] fixes specs --- app/views/budgets/investments/_sidebar.html.erb | 3 +++ spec/features/tags/budget_investments_spec.rb | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 202c8188d..9430120bc 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -9,6 +9,9 @@ verify: link_to(t("budgets.investments.index.sidebar.verify_account"), verification_path)).html_safe %> <% end %> +<% end %> + +<% if @budget.accepting? %> <%= render "shared/tag_cloud", taggable: 'budget/investment' %> <%= render 'categories' %> <% end %> diff --git a/spec/features/tags/budget_investments_spec.rb b/spec/features/tags/budget_investments_spec.rb index 2a2c3e950..f16e9a447 100644 --- a/spec/features/tags/budget_investments_spec.rb +++ b/spec/features/tags/budget_investments_spec.rb @@ -57,7 +57,7 @@ feature 'Tags' do fill_in 'budget_investment_tag_list', with: 'Economía, Hacienda' - click_button 'Create' + click_button 'Create Investment' expect(page).to have_content 'Investment created successfully.' expect(page).to have_content 'Economía' @@ -78,7 +78,7 @@ feature 'Tags' do check 'budget_investment_terms_of_service' find('.js-add-tag-link', text: 'Education').click - click_button 'Create' + click_button 'Create Investment' expect(page).to have_content 'Investment created successfully.' @@ -100,7 +100,7 @@ feature 'Tags' do fill_in 'budget_investment_tag_list', with: "Impuestos, Economía, Hacienda, Sanidad, Educación, Política, Igualdad" - click_button 'Create' + click_button 'Create Investment' expect(page).to have_content error_message expect(page).to have_content 'tags must be less than or equal to 6' @@ -118,7 +118,7 @@ feature 'Tags' do fill_in 'budget_investment_tag_list', with: 'user_id=1, &a=3, ' - click_button 'Create' + click_button 'Create Investment' expect(page).to have_content 'Investment created successfully.' expect(page).to have_content 'user_id1'