mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Add registrar IBAN
This commit is contained in:
parent
10dbd83d50
commit
ca317ace45
8 changed files with 45 additions and 2 deletions
|
@ -73,6 +73,7 @@ module Admin
|
||||||
:vat_rate,
|
:vat_rate,
|
||||||
:accounting_customer_code,
|
:accounting_customer_code,
|
||||||
:billing_email,
|
:billing_email,
|
||||||
|
:iban,
|
||||||
:language)
|
:language)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,15 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-4 control-label">
|
||||||
|
<%= f.label :iban %>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7">
|
||||||
|
<%= f.text_field :iban, class: 'form-control' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
|
|
||||||
<dt><%= Registrar.human_attribute_name :reference_no %></dt>
|
<dt><%= Registrar.human_attribute_name :reference_no %></dt>
|
||||||
<dd><%= registrar.reference_no %></dd>
|
<dd><%= registrar.reference_no %></dd>
|
||||||
|
|
||||||
|
<dt><%= Registrar.human_attribute_name :iban %></dt>
|
||||||
|
<dd><%= registrar.iban %></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -692,3 +692,4 @@ en:
|
||||||
ipv4: IPv4
|
ipv4: IPv4
|
||||||
ipv6: IPv6
|
ipv6: IPv6
|
||||||
reference_no: Reference number
|
reference_no: Reference number
|
||||||
|
iban: IBAN
|
||||||
|
|
5
db/migrate/20190515113153_add_registrars_iban.rb
Normal file
5
db/migrate/20190515113153_add_registrars_iban.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class AddRegistrarsIban < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :registrars, :iban, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -2200,7 +2200,8 @@ CREATE TABLE public.registrars (
|
||||||
reference_no character varying NOT NULL,
|
reference_no character varying NOT NULL,
|
||||||
test_registrar boolean DEFAULT false,
|
test_registrar boolean DEFAULT false,
|
||||||
language character varying NOT NULL,
|
language character varying NOT NULL,
|
||||||
vat_rate numeric(4,3)
|
vat_rate numeric(4,3),
|
||||||
|
iban character varying
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -4966,5 +4967,7 @@ INSERT INTO schema_migrations (version) VALUES ('20190510090240');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20190510102549');
|
INSERT INTO schema_migrations (version) VALUES ('20190510102549');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20190515113153');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20190520093231');
|
INSERT INTO schema_migrations (version) VALUES ('20190520093231');
|
||||||
|
|
||||||
|
|
1
test/fixtures/registrars.yml
vendored
1
test/fixtures/registrars.yml
vendored
|
@ -11,6 +11,7 @@ bestnames:
|
||||||
billing_email: billing@bestnames.test
|
billing_email: billing@bestnames.test
|
||||||
website: https://bestnames.test
|
website: https://bestnames.test
|
||||||
reference_no: 13
|
reference_no: 13
|
||||||
|
iban: GB33BUKB20201555555555
|
||||||
|
|
||||||
goodnames:
|
goodnames:
|
||||||
name: Good Names
|
name: Good Names
|
||||||
|
|
20
test/integration/admin_area/registrars_test.rb
Normal file
20
test/integration/admin_area/registrars_test.rb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class AdminAreaRegistrarsIntegrationTest < ActionDispatch::IntegrationTest
|
||||||
|
include Devise::Test::IntegrationHelpers
|
||||||
|
|
||||||
|
setup do
|
||||||
|
@registrar = registrars(:bestnames)
|
||||||
|
sign_in users(:admin)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_updates_registrar_optional_attributes
|
||||||
|
new_iban = 'GB94BARC10201530093459'
|
||||||
|
assert_not_equal new_iban, @registrar.iban
|
||||||
|
|
||||||
|
patch admin_registrar_path(@registrar), registrar: { iban: new_iban }
|
||||||
|
@registrar.reload
|
||||||
|
|
||||||
|
assert_equal new_iban, @registrar.iban
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue