Sha256: 75d6965a5971bceff6c477ee377a725bd30f7dc3b712479ef7101f9923ff0cf9
Contents?: true
Size: 862 Bytes
Versions: 62
Compression:
Stored size: 862 Bytes
Contents
require 'spec_helper' feature 'disable user flow', organization_workspace: :test do let!(:current_organization) { Organization.current } let(:user) { create(:user) } let!(:chapter) { create(:chapter, lessons: [ create(:lesson, guide: create(:guide))]) } let(:book) { current_organization.book } before { reindex_current_organization! } before { set_current_user! user } scenario 'enabled visitor' do visit '/' expect(page_body).to have_text(current_organization.book.name) expect(user.reload.last_organization).to eq current_organization end scenario 'disable visitor' do user.disable! visit '/' expect(page_body).to_not have_text(current_organization.book.name) expect(page_body).to have_text('You are trying to visit a permamently disabled or deleted resource') end end
Version data entries
62 entries across 62 versions & 1 rubygems