mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Fix rubocop
This commit is contained in:
parent
a4ebb24a03
commit
5ed983fd2e
4 changed files with 5 additions and 6 deletions
|
@ -7,9 +7,9 @@ class Ability
|
|||
@user = user || User.new
|
||||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
|
||||
if @user.roles.nil? || @user.roles.empty?
|
||||
can :show, :dashboard
|
||||
end
|
||||
return if @user.roles || @user.roles.any?
|
||||
|
||||
can :show, :dashboard
|
||||
end
|
||||
|
||||
def user
|
||||
|
|
|
@ -15,7 +15,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
validate :validate_identity_code
|
||||
|
||||
ROLES = ['user', 'customer_service', 'admin']
|
||||
ROLES = %w(user customer_service admin)
|
||||
|
||||
def to_s
|
||||
username
|
||||
|
|
|
@ -57,7 +57,6 @@ task :epppr do
|
|||
set :branch, 'master' # same as staging
|
||||
end
|
||||
|
||||
|
||||
# Manually create these paths in shared/ (eg: shared/config/database.yml) in your server.
|
||||
# They will be linked in the 'deploy:link_shared_paths' step.
|
||||
set :shared_paths, [
|
||||
|
|
|
@ -19,7 +19,7 @@ feature 'Sessions', type: :feature do
|
|||
expect(page).to have_text('Welcome!')
|
||||
|
||||
uri = URI.parse(current_url)
|
||||
expect(uri.path).to eq(admin_root_path)
|
||||
expect(uri.path).to eq(admin_domains_path)
|
||||
|
||||
expect(page).to have_link('Elkdata', count: 2)
|
||||
expect(page).to have_link('Registrar OÜ', count: 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue