This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-02-22 01:55:31 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-11 22:00:43 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe Settings::Exports::BlockedAccountsController do
|
2017-04-28 15:12:37 +02:00
|
|
|
render_views
|
|
|
|
|
2017-04-11 22:00:43 +02:00
|
|
|
describe 'GET #index' do
|
|
|
|
it 'returns a csv of the blocking accounts' do
|
2017-05-29 18:05:01 +02:00
|
|
|
user = Fabricate(:user)
|
|
|
|
user.account.block!(Fabricate(:account, username: 'username', domain: 'domain'))
|
|
|
|
|
|
|
|
sign_in user, scope: :user
|
2017-04-11 22:00:43 +02:00
|
|
|
get :index, format: :csv
|
|
|
|
|
2017-05-29 18:05:01 +02:00
|
|
|
expect(response.body).to eq "username@domain\n"
|
2017-04-11 22:00:43 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|