Skip to content

Commit

Permalink
Merge pull request #1918 from gnclmorais/improve-two-test-messages
Browse files Browse the repository at this point in the history
Fix two rogue messages on tests
  • Loading branch information
matyikriszta authored Sep 30, 2023
2 parents 742abb2 + d083583 commit 4f80b70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/fabricators/sponsor_fabricator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Fabricator(:sponsor_full, from: :sponsor) do
description { Faker::Lorem.word }
level { 'gold' }
accessibility_info { 'Accessible parking spaces' }
end

Fabricator(:sponsor_with_member_contacts, from: :sponsor) do
Expand Down
4 changes: 3 additions & 1 deletion spec/lib/tasks/delete_member_rake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
end

it 'when no email is provided' do
expect { task.invoke }.to raise_error(SystemExit, "You have to provide an email address. Usage: rake member:delete'[[email protected]]'")
regexed_msg = Regexp.quote("You have to provide an email address. Usage: rake member:delete'[[email protected]]'")
expect { task.invoke }.to output(/#{regexed_msg}\s*/).to_stderr
.and raise_error(SystemExit)
end

it 'anonymises member information' do
Expand Down

0 comments on commit 4f80b70

Please sign in to comment.