mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Merge branch 'replace-warden-helpers-with-devise' into registry-790
# Conflicts: # test/integration/admin/domains_test.rb
This commit is contained in:
commit
eddf39ea9b
51 changed files with 53 additions and 52 deletions
|
@ -32,6 +32,8 @@ RSpec.configure do |config|
|
|||
config.include AbstractController::Translation, type: :mailer
|
||||
config.include Requests::EPPHelpers, epp: true
|
||||
config.include Matchers::EPP, epp: true
|
||||
config.include Devise::Test::IntegrationHelpers, type: :feature
|
||||
config.include Devise::Test::IntegrationHelpers, type: :request
|
||||
|
||||
config.define_derived_metadata(file_path: %r[/spec/features/]) do |metadata|
|
||||
metadata[:db] = true if metadata[:db].nil?
|
||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'EPP contact:create' do
|
|||
|
||||
before do
|
||||
Setting.address_processing = false
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when all ident params are valid' do
|
||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe 'EPP contact:create' do
|
|||
}
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
allow(Contact).to receive(:address_processing?).and_return(false)
|
||||
end
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ RSpec.describe 'EPP contact:create' do
|
|||
subject(:address_saved) { Contact.last.attributes.slice(*Contact.address_attribute_names).compact.any? }
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when address processing is enabled' do
|
||||
|
|
|
@ -21,7 +21,7 @@ RSpec.describe 'EPP contact:delete' do
|
|||
}
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when contact is used' do
|
||||
|
|
|
@ -22,7 +22,7 @@ RSpec.describe 'EPP contact:update' do
|
|||
.count }
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
create(:contact, code: 'TEST')
|
||||
end
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ RSpec.describe 'EPP contact:update' do
|
|||
}
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when contact ident is valid' do
|
||||
|
|
|
@ -25,7 +25,7 @@ RSpec.describe 'EPP contact:update' do
|
|||
}
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
allow(Contact).to receive(:address_processing?).and_return(false)
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ RSpec.describe 'EPP contact:update' do
|
|||
subject(:response_description) { response_xml.css('result msg').text }
|
||||
|
||||
before do
|
||||
login_as user
|
||||
sign_in user
|
||||
create(:contact, code: 'TEST')
|
||||
end
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when account balance is sufficient' do
|
||||
|
|
|
@ -38,7 +38,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010 10:30')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when period is absent' do
|
||||
|
|
|
@ -18,7 +18,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when nameserver is optional' do
|
||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010 10:30')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when period is 3 months' do
|
||||
|
|
|
@ -31,7 +31,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when price is present' do
|
||||
|
|
|
@ -18,7 +18,7 @@ RSpec.describe 'EPP domain:create', settings: false do
|
|||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when nameserver is required' do
|
||||
|
|
|
@ -17,7 +17,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
before :example do
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when account balance is sufficient' do
|
||||
|
|
|
@ -38,7 +38,7 @@ RSpec.describe 'EPP domain:renew', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when period is absent' do
|
||||
|
|
|
@ -18,7 +18,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
before :example do
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when given expire time and current match' do
|
||||
|
|
|
@ -20,7 +20,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when domain can be renewed' do
|
||||
|
|
|
@ -15,7 +15,7 @@ RSpec.describe 'EPP domain:renew', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when period is 3 months' do
|
||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe 'EPP domain:renew', settings: false do
|
|||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when price is present' do
|
||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe 'EPP domain:update' do
|
|||
subject(:response_description) { response_xml.css('result msg').text }
|
||||
|
||||
before :example do
|
||||
login_as user
|
||||
sign_in user
|
||||
|
||||
allow(Domain).to receive(:nameserver_required?).and_return(false)
|
||||
Setting.ns_min_count = 2
|
||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe 'EPP domain:update' do
|
|||
subject(:response_description) { response_xml.css('result msg').text }
|
||||
|
||||
before :example do
|
||||
login_as user
|
||||
sign_in user
|
||||
allow(Domain).to receive(:nameserver_required?).and_return(false)
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'EPP domain:update' do
|
|||
let!(:domain) { create(:domain, name: 'test.com', registrant: registrant) }
|
||||
|
||||
before :example do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when registrant change confirmation is enabled' do
|
||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe 'EPP domain:update' do
|
|||
let!(:new_registrant) { create(:registrant, code: 'new-code') }
|
||||
|
||||
before :example do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when registrant change confirmation is enabled' do
|
||||
|
|
|
@ -20,7 +20,7 @@ RSpec.describe 'EPP domain:update' do
|
|||
}
|
||||
|
||||
before :example do
|
||||
login_as user
|
||||
sign_in user
|
||||
end
|
||||
|
||||
context 'when domain has both SERVER_DELETE_PROHIBITED and PENDING_UPDATE statuses' do
|
||||
|
|
|
@ -20,7 +20,7 @@ module Features
|
|||
|
||||
def sign_in_to_registrant_area
|
||||
user = create(:registrant_user)
|
||||
login_as(user, scope: :user)
|
||||
sign_in(user, scope: :user)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue