Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreslucena committed May 22, 2024
1 parent dd184f8 commit 2930d3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 0 additions & 7 deletions decidim-comments/spec/system/comments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
let(:resource_path) { resource_locator(commentable).path }

include_examples "comments"

context "with comments blocked" do
let!(:component) { create(:component, manifest_name: :dummy, participatory_space:, organization:) }
let(:participatory_space) { create(:participatory_process, :with_steps, organization:) }

include_examples "comments blocked"
end
end
4 changes: 3 additions & 1 deletion decidim-dev/app/models/decidim/dev/dummy_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def commentable?

# Public: Whether the object can have new comments or not.
def user_allowed_to_comment?(user)
component.can_participate_in_space?(user)
return unless component.can_participate_in_space?(user)

ActionAuthorizer.new(user, "comment", component, self).authorize.ok?
end

# Public: Whether the object can have new comment votes or not.
Expand Down

0 comments on commit 2930d3d

Please sign in to comment.