Skip to content

Commit

Permalink
Bump rspec from v3.13.0 to v3.13.1 (decidim#13372)
Browse files Browse the repository at this point in the history
* Bump rspec from v3.13.0 to v3.13.1

* Fix examples with empty lists in the include matcher

* Fix factory instantation for example
  • Loading branch information
andreslucena authored Sep 10, 2024
1 parent 3d29998 commit 1fb220b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,9 @@ GEM
rspec-cells (0.3.9)
cells (>= 4.0.0, < 6.0.0)
rspec-rails (>= 3.0.0, < 6.2.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-html-matchers (0.10.0)
Expand Down
2 changes: 1 addition & 1 deletion decidim-blogs/spec/types/post_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Blogs
describe PostType, type: :graphql do
include_context "with a graphql class type"

let(:model) { create(:post) }
let(:model) { create(:post, :with_endorsements) }

include_examples "attachable interface"
include_examples "authorable interface"
Expand Down
4 changes: 2 additions & 2 deletions decidim-budgets/spec/types/budget_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Decidim
module Budgets
describe BudgetType, type: :graphql do
include_context "with a graphql class type"
let(:model) { create(:budget) }
let(:model) { create(:budget, :with_projects) }

include_examples "scopable interface"

Expand Down Expand Up @@ -50,7 +50,7 @@ module Budgets
end

describe "projects" do
let!(:budget2) { create(:budget) }
let!(:budget2) { create(:budget, :with_projects) }
let(:query) { "{ projects { id } }" }

it "returns the budget projects" do
Expand Down
4 changes: 2 additions & 2 deletions decidim-generators/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ GEM
rspec-cells (0.3.9)
cells (>= 4.0.0, < 6.0.0)
rspec-rails (>= 3.0.0, < 6.2.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-html-matchers (0.10.0)
Expand Down
3 changes: 2 additions & 1 deletion decidim-initiatives/spec/types/initiative_api_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ module Initiatives
end

context "when there are initiatives" do
let(:initiatives) { create_list(:initiative, initiatives_type: model, organization: :current_organization) }
let(:scoped_type) { create(:initiatives_type_scope, type: model) }
let!(:initiatives) { create_list(:initiative, 5, scoped_type:, organization: model.organization) }

it "returns the initiatives" do
ids = response["initiatives"].map { |item| item["id"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
hidden_proposals_titles = hidden_proposals.map(&:title).map { |title| translated(title) }
withdrawn_proposals_titles = withdrawn_proposals.map(&:title).map { |title| translated(title) }

highlighted_proposals = page.all(".card--proposal .card__title").map(&:text)
highlighted_proposals = page.all("#participatory-process-homepage-highlighted-proposals .card__list-title").map(&:text)
expect(proposals_titles).to include(*highlighted_proposals)
expect(drafted_proposals_titles).not_to include(*highlighted_proposals)
expect(hidden_proposals_titles).not_to include(*highlighted_proposals)
Expand All @@ -58,7 +58,7 @@
expect(page).to have_css("[id^='proposals__proposal']", count: highlighted_proposals)

proposals_titles = proposals.map(&:title).map { |title| translated(title) }
highlighted_proposals = page.all(".card--proposal .card__title").map(&:text)
highlighted_proposals = page.all("#participatory-process-homepage-highlighted-proposals .card__list-title").map(&:text)
expect(proposals_titles).to include(*highlighted_proposals)
end
end
Expand Down

0 comments on commit 1fb220b

Please sign in to comment.