decidim-comments/spec/models/seed_spec.rb in decidim-0.0.4 vs decidim-comments/spec/models/seed_spec.rb in decidim-0.0.5
- old
+ new
@@ -2,17 +2,16 @@
require "spec_helper"
module Decidim
module Comments
describe Seed do
- let!(:organization) { create(:organization) }
let(:subject) { Decidim::Comments::Seed }
describe "#comments_for(resource)" do
it 'creates comments for a page if one is given' do
- user = create(:user, organization: organization)
- subject.comments_for(user)
- expect(Decidim::Comments::CommentsWithReplies.for(user).length).to be_between(1, 5).inclusive
+ dummy_resource = create(:dummy_resource)
+ subject.comments_for(dummy_resource)
+ expect(Decidim::Comments::SortedComments.for(dummy_resource).length).to be_between(1, 5).inclusive
end
end
end
end
end