mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
parent
a20af372de
commit
ccb062cb0b
4 changed files with 16 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
class RegistrantPresenter
|
||||
delegate :name, :ident, :email, to: :registrant
|
||||
delegate :name, :ident, :email, :priv?, to: :registrant
|
||||
|
||||
def initialize(registrant:, view:)
|
||||
@registrant = registrant
|
||||
|
|
|
@ -12,13 +12,13 @@ Registrisse laekus taotlus domeeni <%= @domain.name %> registreerija vahetuseks.
|
|||
<br><br>
|
||||
Uue registreerija andmed:<br>
|
||||
Nimi: <%= @registrant.name %><br>
|
||||
<% if @params[:registrant_priv] %>
|
||||
Isikukood: <%= @registrant.ident %><br>
|
||||
<% if @registrant.priv? %>
|
||||
Isikukood: <%= @registrant.ident %><br>
|
||||
<% else %>
|
||||
Äriregistrikood: <%= @registrant.ident %><br>
|
||||
Äriregistrikood: <%= @registrant.ident %><br>
|
||||
<% end %>
|
||||
Tänav: <%= @params[:registrant_street] %><br>
|
||||
Linn: <%= @params[:registrant_city] %><br>
|
||||
Tänav: <%= @registrant.street %><br>
|
||||
Linn: <%= @registrant.city %><br>
|
||||
Riik: <%= @params[:registrant_country] %>
|
||||
<br><br>
|
||||
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
|
||||
|
|
|
@ -9,13 +9,13 @@ Veebileht: <%= @registrar.url %>
|
|||
|
||||
Uue registreerija andmed:
|
||||
Nimi: <%= @registrant.name %>
|
||||
<% if @params[:registrant_priv] %>
|
||||
<% if @registrant.priv? %>
|
||||
Isikukood: <%= @registrant.ident %>
|
||||
<% else %>
|
||||
Äriregistrikood: <%= @registrant.ident %>
|
||||
<% end %>
|
||||
Tänav: <%= @params[:registrant_street] %>
|
||||
Linn: <%= @params[:registrant_city] %>
|
||||
Tänav: <%= @registrant.street %>
|
||||
Linn: <%= @registrant.city %>
|
||||
Riik: <%= @params[:registrant_country] %>
|
||||
|
||||
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
|
||||
|
|
|
@ -24,4 +24,11 @@ RSpec.describe RegistrantPresenter do
|
|||
expect(presenter.email).to eq('test email')
|
||||
end
|
||||
end
|
||||
|
||||
describe '#priv?' do
|
||||
it 'delegates to registrant' do
|
||||
expect(registrant).to receive(:priv?).and_return('test')
|
||||
expect(presenter.priv?).to eq('test')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue