Skip to content

Commit

Permalink
Add case where someone has unsubscribed
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwr18 committed Nov 8, 2024
1 parent 009eb7d commit c15ead7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/models/organization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@
end

context 'given an inactive contributor with the same tag' do
before { create(:contributor, tag_list: %w[Homeowner], organization: organization, deactivated_at: 1.day.ago) }
before do
create(:contributor, tag_list: %w[Homeowner], deactivated_at: 1.day.ago, organization: organization)
create(:contributor, tag_list: 'teacher', unsubscribed_at: 1.day.ago, organization: organization)
end

it "does not count inactive contributor's tags" do
expect(subject).to eq([['Homeowner', 1]])
Expand Down

0 comments on commit c15ead7

Please sign in to comment.