severed_relationships_spec.rb 804 B

123456789101112131415161718192021222324
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Severed relationships page' do
  4. include ProfileStories
  5. describe 'GET severed_relationships#index' do
  6. before do
  7. as_a_logged_in_user
  8. event = Fabricate(:relationship_severance_event)
  9. Fabricate.times(3, :severed_relationship, local_account: bob.account, relationship_severance_event: event)
  10. Fabricate(:account_relationship_severance_event, account: bob.account, relationship_severance_event: event)
  11. end
  12. it 'returns http success' do
  13. visit severed_relationships_path
  14. expect(page).to have_title(I18n.t('settings.severed_relationships'))
  15. expect(page).to have_link(href: following_severed_relationship_path(AccountRelationshipSeveranceEvent.first, format: :csv))
  16. end
  17. end
  18. end