muted_accounts_controller_spec.rb 497 B

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