mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
25 lines
658 B
Ruby
25 lines
658 B
Ruby
require 'rails_helper'
|
|
|
|
feature 'Sessions', type: :feature do
|
|
before :all do
|
|
Fabricate(:ee_user)
|
|
@registrar1 = Fabricate(:registrar1)
|
|
@registrar2 = Fabricate(:registrar2)
|
|
Fabricate.times(2, :domain, registrar: @registrar1)
|
|
Fabricate.times(2, :domain, registrar: @registrar2)
|
|
end
|
|
|
|
scenario 'Admin logs in' do
|
|
visit root_path
|
|
page.should have_button('ID card (user1)')
|
|
|
|
click_on 'ID card (user1)'
|
|
page.should have_text('Welcome!')
|
|
|
|
uri = URI.parse(current_url)
|
|
uri.path.should == admin_domains_path
|
|
|
|
page.should have_link('registrar1', count: 2)
|
|
page.should have_link('registrar2', count: 2)
|
|
end
|
|
end
|