Fix rubocop

This commit is contained in:
Martin Lensment 2015-01-21 11:10:59 +02:00
parent a4ebb24a03
commit 5ed983fd2e
4 changed files with 5 additions and 6 deletions

View file

@ -7,10 +7,10 @@ class Ability
@user = user || User.new
@user.roles.each { |role| send(role) } if @user.roles
if @user.roles.nil? || @user.roles.empty?
return if @user.roles || @user.roles.any?
can :show, :dashboard
end
end
def user
can :show, :dashboard

View file

@ -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

View file

@ -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, [

View file

@ -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)