Skip to content

Commit

Permalink
Add omitted value in keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
andreslucena committed Oct 28, 2022
1 parent e604754 commit 2e72c5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -103,9 +103,9 @@ module Admin
it "doesn't import it again" do
expect do
command.call
end.to change { Project.where(budget:).count }.by(1)
end.to change { Project.where(budget: budget).count }.by(1)

projects = Project.where(budget:)
projects = Project.where(budget: budget)
first_project = projects.first
last_project = projects.last
expect(first_project.title).to eq(proposal.title)
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/lib/decidim/resourceable.rb
Expand Up @@ -37,7 +37,7 @@ module Resourceable
#
# Returns an ActiveRecord::Relation.
def linked_resources(resource_name, link_name, component_published: true)
scope = sibling_scope(resource_name, component_published:)
scope = sibling_scope(resource_name, component_published: component_published)

from = scope
.joins(:resource_links_from)
Expand Down
Expand Up @@ -88,9 +88,9 @@ module Admin
it "doesn't import it again" do
expect do
command.call
end.not_to(change { Decidim::Elections::Answer.where(question:).count })
end.not_to(change { Decidim::Elections::Answer.where(question: question).count })

answers = Decidim::Elections::Answer.where(question:)
answers = Decidim::Elections::Answer.where(question: question)
first_answer = answers.first
last_answer = answers.last
expect(first_answer.title).to eq(proposal.title)
Expand Down

0 comments on commit 2e72c5c

Please sign in to comment.