Add auth info to CSV domain list in registrar area

#660
This commit is contained in:
Artur Beljajev 2018-01-18 15:07:14 +02:00
parent a9f04f6f0e
commit c41d329f79
5 changed files with 20 additions and 10 deletions

View file

@ -151,6 +151,7 @@ RSpec.describe DomainPresenter do
domain_delegatable_attributes = %i(
name
auth_info
registrant_name
registrant_id
registrant_code

View file

@ -10,9 +10,10 @@ RSpec.describe Registrar::DomainListCSVPresenter do
it 'is present' do
columns = []
columns[0] = 'Domain'
columns[1] = 'Registrant name'
columns[2] = 'Registrant code'
columns[3] = 'Date of expiry'
columns[1] = 'Auth info'
columns[2] = 'Registrant name'
columns[3] = 'Registrant code'
columns[4] = 'Date of expiry'
columns
expect(header).to eq(columns)
@ -27,19 +28,24 @@ RSpec.describe Registrar::DomainListCSVPresenter do
expect(row[0]).to eq('test name')
end
it 'has domain auth info' do
expect(domain).to receive(:auth_info).and_return('test auth info')
expect(row[1]).to eq('test auth info')
end
it 'has registrant name' do
expect(domain).to receive(:registrant_name).and_return('test registrant name')
expect(row[1]).to eq('test registrant name')
expect(row[2]).to eq('test registrant name')
end
it 'has registrant code' do
expect(domain).to receive(:registrant_code).and_return('test registrant code')
expect(row[2]).to eq('test registrant code')
expect(row[3]).to eq('test registrant code')
end
it 'has expire date' do
expect(domain).to receive(:expire_date).and_return('expire date')
expect(row[3]).to eq('expire date')
expect(row[4]).to eq('expire date')
end
end
end