Sha256: 4b9d12f1f779987579c9a6ef2bb4a7d830bb1ccffb0754f88a397657fd989df0
Contents?: true
Size: 1.23 KB
Versions: 18
Compression:
Stored size: 1.23 KB
Contents
# Initially generated with PgRails::SystemSpecGenerator # https://github.com/martin-rosso/pg_rails require 'rails_helper' # By default uses selenium_chrome_headless_iphone driver # run with DRIVER environment variable to override, eg: # # DRIVER=selenium rspec describe 'Tenants' do subject(:visitar) do visit '/u/cosas' end let(:logged_user) { create :user } before do login_as logged_user end describe 'switcher' do it do visitar expect(page).to have_text 'No hay cosos que mostrar' end context 'when belongs to multiple accounts' do let(:other_account) { create :account } before do ActsAsTenant.with_tenant(other_account) do logged_user.user_accounts.create! end end it 'shows the switcher' do visitar expect(page).to have_text '¿Qué cuenta te gustaría utilizar?' end it 'switches to account' do visitar click_on other_account.to_s visit '/u/categoria_de_cosas' expect(page).to have_text 'No hay categorías de cosas que mostrar' end it 'shows the profile form' do visit '/users/edit' expect(page).to have_text 'Editar Usuario' end end end end
Version data entries
18 entries across 18 versions & 1 rubygems