lists_controller_spec.rb 530 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Settings::Exports::ListsController do
  4. render_views
  5. describe 'GET #index' do
  6. it 'returns a csv of the domains' do
  7. account = Fabricate(:account)
  8. user = Fabricate(:user, account: account)
  9. list = Fabricate(:list, account: account, title: 'The List')
  10. Fabricate(:list_account, list: list, account: account)
  11. sign_in user, scope: :user
  12. get :index, format: :csv
  13. expect(response.body).to match 'The List'
  14. end
  15. end
  16. end