Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antopalidi committed Sep 8, 2024
1 parent 1b938f6 commit be09866
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ def allowed_public_anonymous_action?
when :consultation_list, :participatory_space
allow!
when :consultation
raise ActiveRecord::RecordNotFound unless consultation

toggle_allow(consultation.published? || user&.admin?)
when :question
raise ActiveRecord::RecordNotFound unless question

toggle_allow(question.published? || user&.admin?)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
end

describe "publish and unpublish a component" do
let(:participatory_space_engine) { decidim_admin_consultations }
let!(:component) do
create(:component, participatory_space: question, published_at: published_at)
end
Expand Down

0 comments on commit be09866

Please sign in to comment.