diff options
Diffstat (limited to 'spec/controllers/settings')
3 files changed, 19 insertions, 2 deletions
diff --git a/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb b/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb index 574d4d875..c815bdfec 100644 --- a/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb +++ b/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb @@ -11,7 +11,7 @@ describe Settings::Exports::BlockedAccountsController do expect(response).to have_http_status(:success) expect(response.content_type).to eq 'text/csv' - expect(response.headers['Content-Disposition']).to eq 'attachment; filename="blocking.csv"' + expect(response.headers['Content-Disposition']).to eq 'attachment; filename="blocked_accounts.csv"' end end end diff --git a/spec/controllers/settings/exports/following_accounts_controller_spec.rb b/spec/controllers/settings/exports/following_accounts_controller_spec.rb index bf7680523..a7029709c 100644 --- a/spec/controllers/settings/exports/following_accounts_controller_spec.rb +++ b/spec/controllers/settings/exports/following_accounts_controller_spec.rb @@ -11,7 +11,7 @@ describe Settings::Exports::FollowingAccountsController do expect(response).to have_http_status(:success) expect(response.content_type).to eq 'text/csv' - expect(response.headers['Content-Disposition']).to eq 'attachment; filename="following.csv"' + expect(response.headers['Content-Disposition']).to eq 'attachment; filename="following_accounts.csv"' end end end diff --git a/spec/controllers/settings/exports/muted_accounts_controller_spec.rb b/spec/controllers/settings/exports/muted_accounts_controller_spec.rb new file mode 100644 index 000000000..bb52b6fcf --- /dev/null +++ b/spec/controllers/settings/exports/muted_accounts_controller_spec.rb @@ -0,0 +1,17 @@ +require 'rails_helper' + +describe Settings::Exports::MutedAccountsController do + before do + sign_in Fabricate(:user), scope: :user + end + + describe 'GET #index' do + it 'returns a csv of the muting accounts' do + 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="muted_accounts.csv"' + end + end +end |