mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +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,
|
||||
:accounting_customer_code,
|
||||
:billing_email,
|
||||
:iban,
|
||||
:language)
|
||||
end
|
||||
|
||||
|
|
|
@ -67,6 +67,15 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</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>
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
<dt><%= Registrar.human_attribute_name :reference_no %></dt>
|
||||
<dd><%= registrar.reference_no %></dd>
|
||||
|
||||
<dt><%= Registrar.human_attribute_name :iban %></dt>
|
||||
<dd><%= registrar.iban %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
|
@ -692,3 +692,4 @@ en:
|
|||
ipv4: IPv4
|
||||
ipv6: IPv6
|
||||
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,
|
||||
test_registrar boolean DEFAULT false,
|
||||
language character varying NOT NULL,
|
||||
vat_rate numeric(4,3)
|
||||
vat_rate numeric(4,3),
|
||||
iban character varying
|
||||
);
|
||||
|
||||
|
||||
|
@ -3987,7 +3988,7 @@ CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_
|
|||
|
||||
|
||||
--
|
||||
-- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
-- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_versions_on_item_type_and_item_id ON public.versions USING btree (item_type, item_id);
|
||||
|
@ -4966,5 +4967,7 @@ INSERT INTO schema_migrations (version) VALUES ('20190510090240');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20190510102549');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20190515113153');
|
||||
|
||||
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
|
||||
website: https://bestnames.test
|
||||
reference_no: 13
|
||||
iban: GB33BUKB20201555555555
|
||||
|
||||
goodnames:
|
||||
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