muted_accounts_controller_spec.rb 466 B

1234567891011121314151617
  1. require 'rails_helper'
  2. describe Settings::Exports::MutedAccountsController do
  3. render_views
  4. describe 'GET #index' do
  5. it 'returns a csv of the muting accounts' do
  6. user = Fabricate(:user)
  7. user.account.mute!(Fabricate(:account, username: 'username', domain: 'domain'))
  8. sign_in user, scope: :user
  9. get :index, format: :csv
  10. expect(response.body).to eq "Account address,Hide notifications\nusername@domain,true\n"
  11. end
  12. end
  13. end