Sha256: ffa321d69d04baba1459bae05d4d59af02e109e4de6b1b683e30b0b3321ddb74
Contents?: true
Size: 869 Bytes
Versions: 20
Compression:
Stored size: 869 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim module Comments describe Export do let(:subject) { described_class } let!(:feature) { create(:feature, manifest_name: "dummy") } let!(:dummy_resources) { create_list(:dummy_resource, 2, feature: feature) } let!(:comments) { create_list(:comment, 5, commentable: dummy_resources[1], root_commentable: dummy_resources[1]) } let!(:other_comments) { create_list(:comment, 5) } describe "#comments_for_resource" do let(:collection) { subject.comments_for_resource(Decidim::DummyResource, feature) } it "returns a collection of comments" do expect(collection).to include(*comments) end it "excludes other comments" do expect(collection).to_not include(*other_comments) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems