mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
parent
8a5d06827c
commit
b4bbb17bff
4 changed files with 37 additions and 2 deletions
|
@ -10,4 +10,4 @@
|
||||||
= f.label :legal_document, t(:legal_document)
|
= f.label :legal_document, t(:legal_document)
|
||||||
%p.help-block= t(:legal_document_max_size)
|
%p.help-block= t(:legal_document_max_size)
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= f.file_field :legal_document, :value => '', data: {legal_document: true}
|
= f.legal_document_field :legal_document
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
= label_tag 'domain[legal_document]', t(:legal_document), class: c
|
= label_tag 'domain[legal_document]', t(:legal_document), class: c
|
||||||
%p.help-block= t(:legal_document_max_size)
|
%p.help-block= t(:legal_document_max_size)
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= file_field_tag 'domain[legal_document]', required: fr, data: {legal_document: true}
|
= legal_document_field_tag 'domain[legal_document]', required: fr
|
||||||
.col-md-4
|
.col-md-4
|
||||||
%p.domain-general-help= t(:domain_general_help).html_safe
|
%p.domain-general-help= t(:domain_general_help).html_safe
|
||||||
%p.domain-admin-contact-help= t(:domain_admin_contact_help).html_safe
|
%p.domain-admin-contact-help= t(:domain_admin_contact_help).html_safe
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'registrar/contacts/form/_legal_document' do
|
||||||
|
let(:contact) { instance_spy(Depp::Contact) }
|
||||||
|
|
||||||
|
before :example do
|
||||||
|
allow(view).to receive(:f).and_return(DefaultFormBuilder.new(:depp_contact, contact, view, {}))
|
||||||
|
assign(:contact, contact)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has legal document' do
|
||||||
|
render
|
||||||
|
expect(rendered).to have_css('[name="depp_contact[legal_document]"]')
|
||||||
|
end
|
||||||
|
end
|
20
spec/views/registrar/domains/_form.haml_spec.rb
Normal file
20
spec/views/registrar/domains/_form.haml_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'registrar/domains/_form' do
|
||||||
|
let(:domain) { instance_spy(Depp::Domain) }
|
||||||
|
|
||||||
|
before :example do
|
||||||
|
allow(view).to receive(:f).and_return(DefaultFormBuilder.new(:domain, domain, view, {}))
|
||||||
|
assign(:domain, domain)
|
||||||
|
|
||||||
|
stub_template 'registrar/domains/form/_general' => ''
|
||||||
|
stub_template 'registrar/domains/form/_contacts' => ''
|
||||||
|
stub_template 'registrar/domains/form/_nameservers' => ''
|
||||||
|
stub_template 'registrar/domains/form/_dnskeys' => ''
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has legal document' do
|
||||||
|
render
|
||||||
|
expect(rendered).to have_css('[name="domain[legal_document]"]')
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue