From 74cb51f2e37f9eb9303c17ac3924572dbeac83fe Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Fri, 27 Oct 2017 11:57:37 +0300 Subject: [PATCH] Show registrar's accounting customer code in UI #343 --- app/views/admin/registrars/show.haml | 3 +++ test/controllers/admin/registrars/show_test.rb | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/controllers/admin/registrars/show_test.rb diff --git a/app/views/admin/registrars/show.haml b/app/views/admin/registrars/show.haml index 1907a63edc..7bd49f058a 100644 --- a/app/views/admin/registrars/show.haml +++ b/app/views/admin/registrars/show.haml @@ -42,6 +42,9 @@ %dt= Registrar.human_attribute_name :website %dd= @registrar.website + %dt= Registrar.human_attribute_name :accounting_customer_code + %dd= @registrar.accounting_customer_code + .col-md-6 .panel.panel-default .panel-heading diff --git a/test/controllers/admin/registrars/show_test.rb b/test/controllers/admin/registrars/show_test.rb new file mode 100644 index 0000000000..a3868ddedf --- /dev/null +++ b/test/controllers/admin/registrars/show_test.rb @@ -0,0 +1,13 @@ +require 'test_helper' + +class RegistrarsControllerTest < ActionDispatch::IntegrationTest + def setup + login_as create(:admin_user) + end + + def test_accounting_customer_code + registrar = create(:registrar, accounting_customer_code: 'test accounting customer code') + visit admin_registrar_path(registrar) + assert_text 'test accounting customer code' + end +end