mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Merge branch 'master' into registry-927
This commit is contained in:
commit
1684c5dd34
12 changed files with 29 additions and 21 deletions
|
@ -89,4 +89,8 @@ module ApplicationHelper
|
||||||
types.delete('ddoc')
|
types.delete('ddoc')
|
||||||
".#{types.join(',.')}"
|
".#{types.join(',.')}"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
def body_css_class
|
||||||
|
[controller_path.split('/').map!(&:dasherize), action_name.dasherize, 'page'].join('-')
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||||
= favicon_link_tag 'favicon.ico'
|
= 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"}
|
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||||
.container
|
.container
|
||||||
.navbar-header
|
.navbar-header
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||||
= favicon_link_tag 'favicon.ico'
|
= 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"}
|
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||||
.container
|
.container
|
||||||
.navbar-header
|
.navbar-header
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<!-- Fixed navbar
|
<!-- Fixed navbar
|
||||||
-->
|
-->
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||||
<%= javascript_include_tag 'registrar-manifest' %>
|
<%= javascript_include_tag 'registrar-manifest' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
|
@ -38,7 +38,7 @@ Content-type: application/json
|
||||||
#### Response
|
#### Response
|
||||||
```
|
```
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
Content-Type: application.json
|
Content-Type: application/json
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ Content-type: application/json
|
||||||
#### Response
|
#### Response
|
||||||
```
|
```
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
Content-Type: application.json
|
Content-Type: application/json
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,7 +148,7 @@ Content-type: application/json
|
||||||
|
|
||||||
```
|
```
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Content-Type: application.json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"uuid": "84c62f3d-e56f-40fa-9ca4-dc0137778949",
|
"uuid": "84c62f3d-e56f-40fa-9ca4-dc0137778949",
|
||||||
|
@ -184,7 +184,7 @@ Content-Type: application.json
|
||||||
### Response on failure
|
### Response on failure
|
||||||
```
|
```
|
||||||
HTTP/1.1 400
|
HTTP/1.1 400
|
||||||
Content-Type: application.json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"errors": [
|
"errors": [
|
||||||
|
|
2
test/fixtures/contacts.yml
vendored
2
test/fixtures/contacts.yml
vendored
|
@ -14,7 +14,7 @@ william: &william
|
||||||
name: William
|
name: William
|
||||||
email: william@inbox.test
|
email: william@inbox.test
|
||||||
phone: '+555.555'
|
phone: '+555.555'
|
||||||
fax: +555.555
|
fax: '+666.6'
|
||||||
ident: 12345
|
ident: 12345
|
||||||
ident_type: priv
|
ident_type: priv
|
||||||
ident_country_code: US
|
ident_country_code: US
|
||||||
|
|
11
test/fixtures/registrars.yml
vendored
11
test/fixtures/registrars.yml
vendored
|
@ -40,13 +40,4 @@ complete:
|
||||||
accounting_customer_code: US0001
|
accounting_customer_code: US0001
|
||||||
language: en
|
language: en
|
||||||
vat_no: US12345
|
vat_no: US12345
|
||||||
vat_rate: 0.05
|
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
|
|
12
test/support/task_test_case.rb
Normal file
12
test/support/task_test_case.rb
Normal 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
|
|
@ -12,6 +12,7 @@ require 'capybara/rails'
|
||||||
require 'capybara/minitest'
|
require 'capybara/minitest'
|
||||||
require 'webmock/minitest'
|
require 'webmock/minitest'
|
||||||
require 'support/rails5_assertions' # Remove once upgraded to Rails 5
|
require 'support/rails5_assertions' # Remove once upgraded to Rails 5
|
||||||
|
require 'support/task_test_case'
|
||||||
|
|
||||||
Setting.address_processing = false
|
Setting.address_processing = false
|
||||||
Setting.registry_country_code = 'US'
|
Setting.registry_country_code = 'US'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue