mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Move sessions specs around
This commit is contained in:
parent
bd1b2aa687
commit
a7bdefce58
2 changed files with 287 additions and 287 deletions
File diff suppressed because it is too large
Load diff
|
@ -19,25 +19,6 @@ describe 'EPP Session', epp: true do
|
|||
before(:each) { server_gitlab.open_connection }
|
||||
after(:each) { server_gitlab.close_connection }
|
||||
|
||||
it 'does not log in with invalid user' do
|
||||
response = epp_plain_request(login_xml_cache, :xml)
|
||||
expect(response[:result_code]).to eq('2501')
|
||||
expect(response[:msg]).to eq('Authentication error; server closing connection')
|
||||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
|
||||
Fabricate(:epp_user, active: false)
|
||||
|
||||
response = epp_plain_request(login_xml_cache, :xml)
|
||||
expect(response[:result_code]).to eq('2501')
|
||||
end
|
||||
|
||||
it 'prohibits further actions unless logged in' do
|
||||
response = epp_plain_request(epp_xml.domain.create, :xml)
|
||||
expect(response[:result_code]).to eq('2002')
|
||||
expect(response[:msg]).to eq('You need to login first.')
|
||||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
end
|
||||
|
||||
context 'with valid user' do
|
||||
before(:each) { Fabricate(:epp_user) }
|
||||
|
||||
|
@ -82,5 +63,24 @@ describe 'EPP Session', epp: true do
|
|||
expect(log[2].api_user_registrar).to eq('Registrar OÜ')
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not log in with invalid user' do
|
||||
response = epp_plain_request(login_xml_cache, :xml)
|
||||
expect(response[:result_code]).to eq('2501')
|
||||
expect(response[:msg]).to eq('Authentication error; server closing connection')
|
||||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
|
||||
Fabricate(:epp_user, active: false)
|
||||
|
||||
response = epp_plain_request(login_xml_cache, :xml)
|
||||
expect(response[:result_code]).to eq('2501')
|
||||
end
|
||||
|
||||
it 'prohibits further actions unless logged in' do
|
||||
response = epp_plain_request(epp_xml.domain.create, :xml)
|
||||
expect(response[:result_code]).to eq('2002')
|
||||
expect(response[:msg]).to eq('You need to login first.')
|
||||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue