35 lines
781 B
Ruby
35 lines
781 B
Ruby
require "rails_helper"
|
|
|
|
feature "User managing locked account" do
|
|
let(:user) { create(:user, :account_manager) }
|
|
let(:project) { create(:project) }
|
|
|
|
before do
|
|
sign_in(user)
|
|
user.accounts.first.update(locked: true)
|
|
end
|
|
|
|
scenario "user is redirected to custom landing page when opens projects index page" do
|
|
paths = [
|
|
projects_path,
|
|
project_path(project),
|
|
project_task_requests_path(project),
|
|
project_contract_templates_path(project),
|
|
project_broadcasts_path(project),
|
|
project_videos_path(project),
|
|
]
|
|
|
|
paths.each do |path|
|
|
visit path
|
|
|
|
expect(page).to have_content locked_account_warning
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def locked_account_warning
|
|
t 'locked_accounts.index.account_locked_message'
|
|
end
|
|
end
|