Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/decidim/proposals/proposals/_proposals.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
).html_safe, callout_class: "warning [&>a]:text-secondary") %>
<% end %>

<% if @proposals.empty? && @external_proposals.empty? %>
<% if @proposals.empty? && @external_proposals&.empty? %>
<%= cell("decidim/announcement", params[:filter].present? ? t(".empty_filters") : t(".empty")) %>
<% else %>
<div class="flex items-center justify-between">
Expand Down
4 changes: 1 addition & 3 deletions lib/decidim/dataspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
require "decidim/dataspace/admin"
require "decidim/dataspace/engine"
require "decidim/dataspace/admin_engine"
require "decidim/dataspace/component"

module Decidim
# This namespace holds the logic of the `Dataspace` component. This component
# allows users to create dataspace in a participatory space.
# This namespace holds the logic of the `Dataspace` module.
module Dataspace
end
end
40 changes: 0 additions & 40 deletions lib/decidim/dataspace/component.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
# 2 comments without details
expect(response.parsed_body["children"].size).to eq(2)
expect(response.parsed_body["children"].first.class).to eq(String)
expect(response.parsed_body["children"].first).to eq(comment_one.reference)
expect([comment_one.reference, comment_two.reference]).to include(response.parsed_body["children"].first)
end
end

Expand All @@ -160,8 +160,8 @@
# 2 comments with details
expect(response.parsed_body["children"].size).to eq(2)
expect(response.parsed_body["children"].first.class).to eq(Hash)
expect(response.parsed_body["children"].first["reference"]).to eq(comment_one.reference)
expect(response.parsed_body["children"].first["content"]).to eq(comment_one.body["en"])
expect([comment_one.reference, comment_two.reference]).to include(response.parsed_body["children"].first["reference"])
expect([comment_one.body["en"], comment_two.body["en"]]).to include(response.parsed_body["children"].first["content"])
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/models/contribution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module Dataspace
expect(method_call.first.class).to eq(Hash)
# first is proposal and has 2 children
expect(method_call.first[:children].size).to eq(2)
# second will be the first comment of proposal
expect(method_call.second[:reference]).to eq(comment_one.reference)
# second will be a comment of proposal
expect([comment_one.reference, comment_two.reference]).to include(method_call.second[:reference])
# last is proposal_three and has no children
expect(method_call.last[:children]).to eq([])
end
Expand Down Expand Up @@ -72,7 +72,7 @@ module Dataspace
expect(method_call[:children].size).to eq(2)
# comments are not detailed
expect(method_call[:children].first.class).to eq(String)
expect(method_call[:children].first).to eq(comment_one.reference)
expect([comment_one.reference, comment_two.reference]).to include(method_call[:children].first)
end
end

Expand All @@ -89,7 +89,7 @@ module Dataspace
expect(method_call[:children].size).to eq(2)
# comments are detailed
expect(method_call[:children].first.class).to eq(Hash)
expect(method_call[:children].first[:reference]).to eq(comment_one.reference)
expect([comment_one.reference, comment_two.reference]).to include(method_call[:children].first[:reference])
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/presenters/contribution_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module Dataspace
expect(method_call.size).to eq(13)
expect(method_call[:reference]).to eq(proposal.reference)
expect(method_call[:title]).to eq(translated_attribute(proposal.title))
expect(method_call[:children]).to eq([comment_one.reference, comment_two.reference])
expect([comment_one.reference, comment_two.reference]).to include(method_call[:children].first)
expect([comment_one.reference, comment_two.reference]).to include(method_call[:children].last)
end
end
end
Expand Down
Loading