Fix notifiable in-app topic specs

These specs had never been tested before and were always broken.
This commit is contained in:
Javi Martín
2019-09-27 19:49:25 +02:00
parent dcc9a6b561
commit db90672fdd
2 changed files with 7 additions and 1 deletions

View File

@@ -21,6 +21,12 @@ FactoryBot.define do
sequence(:title) { |n| "Topic title #{n}" }
sequence(:description) { |n| "Description as comment #{n}" }
association :author, factory: :user
trait :with_community do
community { create(:proposal).community }
end
factory :topic_with_community, traits: [:with_community]
end
factory :related_content do

View File

@@ -3,7 +3,7 @@ require "rails_helper"
describe "Topics" do
context "Concerns" do
it_behaves_like "notifiable in-app", Topic
it_behaves_like "notifiable in-app", :topic_with_community
end
context "New" do