mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
24 lines
612 B
Ruby
24 lines
612 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe Registrar::DomainsController, db: true do
|
|
describe '#index' do
|
|
before do
|
|
sign_in_to_registrar_area
|
|
end
|
|
|
|
it 'responds with success' do
|
|
csv_presenter = instance_double(Registrar::DomainListCSVPresenter, to_s: 'csv')
|
|
expect(Registrar::DomainListCSVPresenter).to receive(:new).and_return(csv_presenter)
|
|
|
|
get registrar_domains_url(format: 'csv')
|
|
|
|
expect(response.body).to eq('csv')
|
|
end
|
|
|
|
it 'returns csv' do
|
|
get registrar_domains_url(format: 'csv')
|
|
|
|
expect(response).to have_http_status(:success)
|
|
end
|
|
end
|
|
end
|