Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbaraOliveira13 committed Nov 19, 2024
1 parent 6694118 commit d2a1e48
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,10 @@ module Decidim::DecidimAwesome
end

it "returns all vote weights for a component" do
allow(component.settings).to receive(:awesome_voting_manifest).and_return("default")
expect(proposal.reload.extra_fields.vote_weight_totals).to eq({ "3" => 1, "4" => 1 })
# update_vote_weights!
proposal.update_vote_weights!
# puts "Vote Weights After Update: #{proposal.vote_weights}"
# puts "Vote Weight Totals: #{proposal.extra_fields.vote_weight_totals}"
expect(proposal.vote_weights).to eq({ "1" => 0, "2" => 0 })
proposal.update_vote_weights!
expect(proposal.vote_weights).to eq({ "1" => 1, "2" => 0 })
expect(proposal.reload.vote_weights).to eq({ "1" => 1, "2" => 0 })
expect(another_proposal.reload.vote_weights).to eq({ "1" => 0, "2" => 1 })
expect(proposal.extra_fields.vote_weight_totals).to eq({ "1" => 1 })
expect(another_proposal.extra_fields.vote_weight_totals).to eq({ "2" => 1 })
Expand Down

0 comments on commit d2a1e48

Please sign in to comment.