2017-04-12 16:20:44 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe Settings::Exports::MutedAccountsController do
|
2017-04-28 13:12:37 +00:00
|
|
|
render_views
|
|
|
|
|
2017-04-12 16:20:44 +00:00
|
|
|
describe 'GET #index' do
|
|
|
|
it 'returns a csv of the muting accounts' do
|
2017-05-29 16:05:01 +00:00
|
|
|
user = Fabricate(:user)
|
|
|
|
user.account.mute!(Fabricate(:account, username: 'username', domain: 'domain'))
|
|
|
|
|
|
|
|
sign_in user, scope: :user
|
2017-04-12 16:20:44 +00:00
|
|
|
get :index, format: :csv
|
|
|
|
|
2017-05-29 16:05:01 +00:00
|
|
|
expect(response.body).to eq "username@domain\n"
|
2017-04-12 16:20:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|