Spec Settings::Exports (#3384)
* Spec output of Settings::Exports::BlockedAccountsController * Spec output of Settings::Exports::FollowingAccountsController * Spec output of Settings::Exports::MutedAccountsController * Spec Settings::Exports::BaseController This commit removes duplicate specs in classes inheriting Settings::Exports::BaseController as well.
This commit is contained in:
parent
fd328cf6e8
commit
c347327d54
4 changed files with 44 additions and 21 deletions
|
@ -3,17 +3,15 @@ require 'rails_helper'
|
|||
describe Settings::Exports::BlockedAccountsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
sign_in Fabricate(:user), scope: :user
|
||||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
it 'returns a csv of the blocking accounts' do
|
||||
user = Fabricate(:user)
|
||||
user.account.block!(Fabricate(:account, username: 'username', domain: 'domain'))
|
||||
|
||||
sign_in user, scope: :user
|
||||
get :index, format: :csv
|
||||
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.content_type).to eq 'text/csv'
|
||||
expect(response.headers['Content-Disposition']).to eq 'attachment; filename="blocked_accounts.csv"'
|
||||
expect(response.body).to eq "username@domain\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue