Skip to content

Commit

Permalink
Fix notifiable in-app topic specs
Browse files Browse the repository at this point in the history
These specs had never been tested before and were always broken.
  • Loading branch information
javierm committed Sep 27, 2019
1 parent de3397b commit d79d840
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions spec/factories/classifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
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
Expand Down
2 changes: 1 addition & 1 deletion spec/features/topics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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
Expand Down

0 comments on commit d79d840

Please sign in to comment.