Fix EPP login in specs

#700
This commit is contained in:
Artur Beljajev 2018-02-07 08:46:55 +02:00
parent ad1f5e6144
commit 278ae07ac6
28 changed files with 141 additions and 84 deletions

View file

@ -1,7 +1,8 @@
require 'rails_helper'
RSpec.describe 'EPP domain:create', settings: false do
let(:request) { post '/epp/command/create', frame: request_xml }
let(:session_id) { create(:epp_session, user: user, registrar: registrar).session_id }
let(:request) { post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session_id}" }
let!(:registrar) { create(:registrar_with_unlimited_balance) }
let!(:user) { create(:api_user_epp, registrar: registrar) }
let!(:contact) { create(:contact, code: 'test') }
@ -17,7 +18,7 @@ RSpec.describe 'EPP domain:create', settings: false do
before :example do
travel_to Time.zone.parse('05.07.2010')
sign_in_to_epp_area(user: user)
login_as user
end
context 'when nameserver is optional' do