mirror of
https://github.com/internetee/registry.git
synced 2025-07-19 17:25:57 +02:00
Merge branch 'master' into registry-475
This commit is contained in:
commit
ffd9f28aee
11 changed files with 72 additions and 16 deletions
14
spec/features/registrar/domains/new_spec.rb
Normal file
14
spec/features/registrar/domains/new_spec.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'New domain in registrar area', settings: false do
|
||||
background do
|
||||
sign_in_to_registrar_area
|
||||
end
|
||||
|
||||
it 'has default period' do
|
||||
visit registrar_domains_path
|
||||
click_link_or_button t('new')
|
||||
|
||||
expect(page).to have_field('domain_period', with: Depp::Domain.default_period)
|
||||
end
|
||||
end
|
18
spec/features/registrar/domains/renew_spec.rb
Normal file
18
spec/features/registrar/domains/renew_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Renew domain in registrar area' do
|
||||
given!(:registrar) { create(:registrar) }
|
||||
given!(:user) { create(:api_user, registrar: registrar) }
|
||||
given!(:domain) { create(:domain, registrar: registrar) }
|
||||
|
||||
background do
|
||||
sign_in_to_registrar_area(user: user)
|
||||
end
|
||||
|
||||
it 'has default period' do
|
||||
visit registrar_domains_path
|
||||
click_link_or_button t('renew')
|
||||
|
||||
expect(page).to have_field('period', with: Depp::Domain.default_period)
|
||||
end
|
||||
end
|
9
spec/models/depp/domain_spec.rb
Normal file
9
spec/models/depp/domain_spec.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Depp::Domain do
|
||||
describe '::default_period', db: false, settings: false do
|
||||
it 'returns default period' do
|
||||
expect(described_class.default_period).to eq('1y')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,4 +1,6 @@
|
|||
require 'webmock/rspec'
|
||||
WebMock.disable_net_connect!(allow_localhost: true)
|
||||
|
||||
if ENV['TRAVIS']
|
||||
require 'simplecov'
|
||||
SimpleCov.start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue