2023-02-22 09:55:31 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-13 01:20:44 +09:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe Settings::Exports::MutedAccountsController do
|
2017-04-28 22:12:37 +09:00
|
|
|
render_views
|
|
|
|
|
2017-04-13 01:20:44 +09:00
|
|
|
describe 'GET #index' do
|
|
|
|
it 'returns a csv of the muting accounts' do
|
2017-05-30 01:05:01 +09:00
|
|
|
user = Fabricate(:user)
|
|
|
|
user.account.mute!(Fabricate(:account, username: 'username', domain: 'domain'))
|
|
|
|
|
|
|
|
sign_in user, scope: :user
|
2017-04-13 01:20:44 +09:00
|
|
|
get :index, format: :csv
|
|
|
|
|
2019-04-04 01:17:43 +09:00
|
|
|
expect(response.body).to eq "Account address,Hide notifications\nusername@domain,true\n"
|
2017-04-13 01:20:44 +09:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|