Merge branch 'master' into registry-927

This commit is contained in:
Maciej Szlosarczyk 2018-08-27 12:35:35 +03:00
commit 1684c5dd34
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
12 changed files with 29 additions and 21 deletions

View file

@ -89,4 +89,8 @@ module ApplicationHelper
types.delete('ddoc')
".#{types.join(',.')}"
end
end
def body_css_class
[controller_path.split('/').map!(&:dasherize), action_name.dasherize, 'page'].join('-')
end
end

View file

@ -10,7 +10,7 @@
= csrf_meta_tags
= stylesheet_link_tag 'admin-manifest', media: 'all'
= favicon_link_tag 'favicon.ico'
%body{:style => env_style}
%body{:style => env_style, class: body_css_class}
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
.container
.navbar-header

View file

@ -9,7 +9,7 @@
= csrf_meta_tags
= stylesheet_link_tag 'admin-manifest', media: 'all'
= favicon_link_tag 'favicon.ico'
%body{:style => env_style}
%body{:style => env_style, class: body_css_class}
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
.container
.navbar-header

View file

@ -14,7 +14,7 @@
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
<%= favicon_link_tag 'favicon.ico' %>
</head>
<body>
<body class="<%= body_css_class %>">
<!-- Fixed navbar
-->
<nav class="navbar navbar-default navbar-fixed-top">

View file

@ -14,7 +14,7 @@
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
<%= favicon_link_tag 'favicon.ico' %>
</head>
<body>
<body class="<%= body_css_class %>">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">

View file

@ -13,7 +13,7 @@
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
<%= javascript_include_tag 'registrar-manifest' %>
</head>
<body>
<body class="<%= body_css_class %>">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">

View file

@ -38,7 +38,7 @@ Content-type: application/json
#### Response
```
HTTP/1.1 201
Content-Type: application.json
Content-Type: application/json
{
@ -70,7 +70,7 @@ Content-type: application/json
#### Response
```
HTTP/1.1 201
Content-Type: application.json
Content-Type: application/json
{

View file

@ -148,7 +148,7 @@ Content-type: application/json
```
HTTP/1.1 200
Content-Type: application.json
Content-Type: application/json
{
"uuid": "84c62f3d-e56f-40fa-9ca4-dc0137778949",
@ -184,7 +184,7 @@ Content-Type: application.json
### Response on failure
```
HTTP/1.1 400
Content-Type: application.json
Content-Type: application/json
{
"errors": [

View file

@ -14,7 +14,7 @@ william: &william
name: William
email: william@inbox.test
phone: '+555.555'
fax: +555.555
fax: '+666.6'
ident: 12345
ident_type: priv
ident_country_code: US

View file

@ -40,13 +40,4 @@ complete:
accounting_customer_code: US0001
language: en
vat_no: US12345
vat_rate: 0.05
not_in_use:
name: any
reg_no: any
code: any
email: any@example.com
country_code: US
accounting_customer_code: any
language: en
vat_rate: 0.05

View file

@ -0,0 +1,12 @@
class TaskTestCase < ActiveSupport::TestCase
setup do
# Rake tasks usually display some results, which mixes up with test results.
# This suppresses default stdout and makes Rails.env.test? checks unnecessary.
@original_stdout = $stdout
$stdout = File.open(File::NULL, 'w')
end
teardown do
$stdout = @original_stdout
end
end

View file

@ -12,6 +12,7 @@ require 'capybara/rails'
require 'capybara/minitest'
require 'webmock/minitest'
require 'support/rails5_assertions' # Remove once upgraded to Rails 5
require 'support/task_test_case'
Setting.address_processing = false
Setting.registry_country_code = 'US'