Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicated spec #5502

Merged
merged 1 commit into from Apr 24, 2024
Merged

Remove duplicated spec #5502

merged 1 commit into from Apr 24, 2024

Conversation

decabeza
Copy link
Collaborator

Objectives

This PR deletes a duplicate spec on budgets/investments_spec.rb.

Spec deleted

scenario "Show should display support text and count" do
  investment = create(:budget_investment, budget: budget, heading: heading, voters: [create(:user)])

  visit budget_investment_path(budget, investment)

  within("#budget_investment_#{investment.id}") do
    expect(page).to have_content "SUPPORTS"
    expect(page).to have_content "1 support"
  end
end

Spec that remains

budgets/investments_spec.rb:1317

scenario "Sidebar in show should display support text and count" do
  investment = create(:budget_investment, :selected, budget: budget, voters: [create(:user)])

  visit budget_investment_path(budget, investment)

  within("aside") do
    expect(page).to have_content "SUPPORTS"
    expect(page).to have_content "1 support"
  end
end

Since the only place the "SUPPORTS / 1 support" text appears in the show view is in the sidebar, I think it makes more sense to leave this one using the <aside> to check that it appears. 馃槍

Copy link
Member

@javierm javierm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 馃帀

Consul Democracy automation moved this from Reviewing to Testing Apr 24, 2024
@javierm javierm added the Specs label Apr 24, 2024
@javierm javierm self-assigned this Apr 24, 2024
@javierm javierm merged commit 08fc6e8 into master Apr 24, 2024
15 checks passed
@javierm javierm deleted the duplicated_budget_spec branch April 24, 2024 14:38
Consul Democracy automation moved this from Testing to Release 2.2.0 Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Consul Democracy
  
Release 2.2.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants