From 2d6ed7fa459900c0c32bc548b3d11ece5caf9f3c Mon Sep 17 00:00:00 2001 From: Priit Tamboom Date: Fri, 10 Oct 2014 15:10:05 +0300 Subject: [PATCH] rubocop autocorret to get tests green --- .../admin/contact_versions_controller.rb | 1 + .../admin/domain_versions_controller.rb | 1 + app/controllers/client/contacts_controller.rb | 4 +- app/controllers/sessions_controller.rb | 5 +- app/helpers/application_helper.rb | 2 +- app/helpers/epp/contacts_helper.rb | 6 +-- app/helpers/epp/domains_helper.rb | 8 ++-- app/models/ability.rb | 5 +- app/models/address.rb | 34 ++++++------- app/models/concerns/epp_errors.rb | 4 +- app/models/concerns/user_events.rb | 2 - app/models/contact.rb | 19 ++++---- app/models/contact_version.rb | 1 - app/models/domain.rb | 8 ++-- app/models/epp/epp_domain.rb | 20 ++++---- app/models/registrar.rb | 9 ++-- config/initializers/devise.rb | 4 +- config/routes.rb | 6 +-- lib/tasks/whois.rake | 9 ++-- spec/epp/contact_spec.rb | 2 +- spec/epp/domain_spec.rb | 48 +++++++++---------- spec/epp/epp_helper_spec.rb | 13 +++-- spec/features/client_contact_spec.rb | 4 +- spec/models/contact_spec.rb | 2 +- 24 files changed, 105 insertions(+), 112 deletions(-) diff --git a/app/controllers/admin/contact_versions_controller.rb b/app/controllers/admin/contact_versions_controller.rb index 4748cff3a..1636a24ab 100644 --- a/app/controllers/admin/contact_versions_controller.rb +++ b/app/controllers/admin/contact_versions_controller.rb @@ -11,6 +11,7 @@ class Admin::ContactVersionsController < AdminController end private + def set_contact @contact = Contact.find(params[:id]) end diff --git a/app/controllers/admin/domain_versions_controller.rb b/app/controllers/admin/domain_versions_controller.rb index 784b2553a..297f04ecb 100644 --- a/app/controllers/admin/domain_versions_controller.rb +++ b/app/controllers/admin/domain_versions_controller.rb @@ -11,6 +11,7 @@ class Admin::DomainVersionsController < AdminController end private + def set_domain @domain = Domain.find(params[:id]) end diff --git a/app/controllers/client/contacts_controller.rb b/app/controllers/client/contacts_controller.rb index 40a9b0b63..1df2c888e 100644 --- a/app/controllers/client/contacts_controller.rb +++ b/app/controllers/client/contacts_controller.rb @@ -27,7 +27,7 @@ class Client::ContactsController < ClientController redirect_to [:client, @contact] else flash[:alert] = I18n.t('shared.failed_to_create_contact') - render "new" + render 'new' end end @@ -63,7 +63,7 @@ class Client::ContactsController < ClientController end def contact_params - params.require(:contact).permit( :email, :phone, :fax, :ident_type, :ident, :auth_info, :name, :org_name, + params.require(:contact).permit(:email, :phone, :fax, :ident_type, :ident, :auth_info, :name, :org_name, address_attributes: [:city, :street, :zip, :street2, :street3, :country_id]) end end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 8af49734a..c878393e1 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,6 +1,6 @@ class SessionsController < Devise::SessionsController def create - #TODO: Create ID Card login here: + # TODO: Create ID Card login here: # this is just testing config # if Rails.env.development? || Rails.env.test? @user = User.find_by(username: 'gitlab') if params[:gitlab] @@ -10,8 +10,7 @@ class SessionsController < Devise::SessionsController session[:current_user_registrar_id] = Registrar.first.id if @user.admin? flash[:notice] = I18n.t('shared.welcome') - sign_in_and_redirect @user, :event => :authentication - return + sign_in_and_redirect @user, event: :authentication # end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7e225ced6..77cfbedb3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,5 @@ module ApplicationHelper def coffee_script_tag(&block) - content_tag(:script, CoffeeScript.compile(capture(&block)).html_safe, :type => 'text/javascript') + content_tag(:script, CoffeeScript.compile(capture(&block)).html_safe, type: 'text/javascript') end end diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index 083e85253..ca13d1bab 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -54,11 +54,11 @@ module Epp::ContactsHelper ## CREATE def validate_contact_create_request @ph = params_hash['epp']['command']['create']['create'] - xml_attrs_present?(@ph, [ %w(authInfo pw), %w(postalInfo)]) + xml_attrs_present?(@ph, [%w(authInfo pw), %w(postalInfo)]) return epp_errors.empty? unless @ph['postalInfo'].is_a?(Hash) || @ph['postalInfo'].is_a?(Array) - #(epp_errors << Address.validate_postal_info_types(parsed_frame)).flatten! + # (epp_errors << Address.validate_postal_info_types(parsed_frame)).flatten! xml_attrs_array_present?(@ph['postalInfo'], [%w(name), %w(addr city), %w(addr cc)]) end @@ -114,7 +114,7 @@ module Epp::ContactsHelper def owner? return false unless find_contact - #return true if current_epp_user.registrar == find_contact.created_by.try(:registrar) + # return true if current_epp_user.registrar == find_contact.created_by.try(:registrar) return true if @contact.registrar == current_epp_user.registrar epp_errors << { code: '2201', msg: t('errors.messages.epp_authorization_error') } false diff --git a/app/helpers/epp/domains_helper.rb b/app/helpers/epp/domains_helper.rb index bea0f17f8..de048ce35 100644 --- a/app/helpers/epp/domains_helper.rb +++ b/app/helpers/epp/domains_helper.rb @@ -7,12 +7,12 @@ module Epp::DomainsHelper if @domain.errors.any? handle_errors(@domain) - raise ActiveRecord::Rollback and return + fail ActiveRecord::Rollback and return end unless @domain.save handle_errors(@domain) - raise ActiveRecord::Rollback and return + fail ActiveRecord::Rollback and return end render '/epp/domains/create' @@ -55,12 +55,12 @@ module Epp::DomainsHelper if @domain.errors.any? handle_errors(@domain) - raise ActiveRecord::Rollback and return + fail ActiveRecord::Rollback and return end unless @domain.save handle_errors(@domain) - raise ActiveRecord::Rollback and return + fail ActiveRecord::Rollback and return end render '/epp/domains/success' diff --git a/app/models/ability.rb b/app/models/ability.rb index 7b03cac59..eaaedeea1 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -2,8 +2,7 @@ class Ability include CanCan::Ability def initialize(user) - - alias_action :create, :read, :update, :destroy, :to => :crud + alias_action :create, :read, :update, :destroy, to: :crud user ||= User.new @@ -37,7 +36,7 @@ class Ability can :read, DomainTransfer, transfer_to_id: user.registrar.id can :read, DomainTransfer, transfer_from_id: user.registrar.id can :approve_as_client, DomainTransfer, - transfer_from_id: user.registrar.id, status: DomainTransfer::PENDING + transfer_from_id: user.registrar.id, status: DomainTransfer::PENDING end # Define abilities for the passed in user here. For example: diff --git a/app/models/address.rb b/app/models/address.rb index a957b86f1..8a74b1e72 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -13,19 +13,19 @@ class Address < ActiveRecord::Base has_paper_trail class_name: 'AddressVersion' class << self -# def validate_postal_info_types(parsed_frame) -# errors, used = [], [] -# parsed_frame.css('postalInfo').each do |pi| -# attr = pi.attributes['type'].try(:value) -# errors << { code: 2003, msg: I18n.t('errors.messages.attr_missing', key: 'type') } and next unless attr -# unless TYPES.include?(attr) -# errors << { code: 2005, msg: I18n.t('errors.messages.invalid_type'), value: { obj: 'type', val: attr } } -# next -# end -# errors << { code: 2005, msg: I18n.t('errors.messages.repeating_postal_info') } and next if used.include?(attr) -# used << attr -# end; errors -# end + # def validate_postal_info_types(parsed_frame) + # errors, used = [], [] + # parsed_frame.css('postalInfo').each do |pi| + # attr = pi.attributes['type'].try(:value) + # errors << { code: 2003, msg: I18n.t('errors.messages.attr_missing', key: 'type') } and next unless attr + # unless TYPES.include?(attr) + # errors << { code: 2005, msg: I18n.t('errors.messages.invalid_type'), value: { obj: 'type', val: attr } } + # next + # end + # errors << { code: 2005, msg: I18n.t('errors.messages.repeating_postal_info') } and next if used.include?(attr) + # used << attr + # end; errors + # end def extract_attributes(ah) address_hash = {} @@ -36,10 +36,10 @@ class Address < ActiveRecord::Base private -# def local?(postal_info) -# return :local_address_attributes if postal_info[:type] == LOCAL_TYPE_SHORT -# :international_address_attributes -# end + # def local?(postal_info) + # return :local_address_attributes if postal_info[:type] == LOCAL_TYPE_SHORT + # :international_address_attributes + # end def addr_hash_from_params(addr) return {} if addr.nil? diff --git a/app/models/concerns/epp_errors.rb b/app/models/concerns/epp_errors.rb index 8e637fd74..7d18993ed 100644 --- a/app/models/concerns/epp_errors.rb +++ b/app/models/concerns/epp_errors.rb @@ -25,7 +25,7 @@ module EppErrors values.each do |err| code, value = find_epp_code_and_value(err) next unless code - epp_errors << { code: code, msg: err, value: value} + epp_errors << { code: code, msg: err, value: value } end epp_errors end @@ -37,7 +37,7 @@ module EppErrors epp_errors = [] send(key).each do |x| - x.errors.messages.each do |key, values| + x.errors.messages.each do |_key, values| epp_errors << x.collect_parent_errors(values) end end if multi.include?(macro) diff --git a/app/models/concerns/user_events.rb b/app/models/concerns/user_events.rb index 7513e9788..a645b590e 100644 --- a/app/models/concerns/user_events.rb +++ b/app/models/concerns/user_events.rb @@ -18,7 +18,5 @@ module UserEvents def epp_user_events(id) where(whodunnit: "#{id}-EppUser") end - - end end diff --git a/app/models/contact.rb b/app/models/contact.rb index a5089d4e6..0d301606f 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -5,8 +5,8 @@ class Contact < ActiveRecord::Base include EppErrors - #has_one :local_address, dependent: :destroy - #has_one :international_address, dependent: :destroy + # has_one :local_address, dependent: :destroy + # has_one :international_address, dependent: :destroy has_one :address, dependent: :destroy has_one :disclosure, class_name: 'ContactDisclosure' @@ -20,22 +20,22 @@ class Contact < ActiveRecord::Base accepts_nested_attributes_for :address, :disclosure - validates :code, :phone, :email, :ident, :address, :registrar,presence: true + validates :code, :phone, :email, :ident, :address, :registrar, presence: true validate :ident_must_be_valid - #validate :presence_of_one_address + # validate :presence_of_one_address validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/ # /\+\d{3}\.\d+/ validates :email, format: /@/ validates :code, uniqueness: { message: :epp_id_taken } - delegate :country, to: :address#, prefix: true - delegate :city, to: :address#, prefix: true - delegate :street, to: :address#, prefix: true - delegate :zip, to: :address#, prefix: true + delegate :country, to: :address # , prefix: true + delegate :city, to: :address # , prefix: true + delegate :street, to: :address # , prefix: true + delegate :zip, to: :address # , prefix: true - #scopes + # scopes scope :current_registrars, ->(id) { where(registrar_id: id) } # archiving has_paper_trail class_name: 'ContactVersion' @@ -97,7 +97,6 @@ class Contact < ActiveRecord::Base # should use only in transaction def destroy_and_clean - if relations_with_domain? errors.add(:domains, :exist) return false diff --git a/app/models/contact_version.rb b/app/models/contact_version.rb index a60e02da4..883f08465 100644 --- a/app/models/contact_version.rb +++ b/app/models/contact_version.rb @@ -5,5 +5,4 @@ class ContactVersion < PaperTrail::Version self.table_name = :contact_versions self.sequence_name = :contact_version_id_seq - end diff --git a/app/models/domain.rb b/app/models/domain.rb index 5d5338947..d91cf0fe0 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -19,17 +19,17 @@ class Domain < ActiveRecord::Base has_many :nameservers, dependent: :delete_all accepts_nested_attributes_for :nameservers, allow_destroy: true, - reject_if: proc { |attrs| attrs[:hostname].blank? } + reject_if: proc { |attrs| attrs[:hostname].blank? } has_many :domain_statuses, dependent: :delete_all accepts_nested_attributes_for :domain_statuses, allow_destroy: true, - reject_if: proc { |attrs| attrs[:value].blank? } + reject_if: proc { |attrs| attrs[:value].blank? } has_many :domain_transfers, dependent: :delete_all has_many :dnskeys, dependent: :delete_all accepts_nested_attributes_for :dnskeys, allow_destroy: true, - reject_if: proc { |attrs| attrs[:public_key].blank? } + reject_if: proc { |attrs| attrs[:public_key].blank? } delegate :code, to: :owner_contact, prefix: true delegate :email, to: :owner_contact, prefix: true @@ -118,7 +118,7 @@ class Domain < ActiveRecord::Base def validate_nameserver_ips nameservers.each do |ns| - next if !ns.hostname.end_with?(name) + next unless ns.hostname.end_with?(name) next if ns.ipv4.present? errors.add(:nameservers, :invalid) if errors[:nameservers].blank? ns.errors.add(:ipv4, :blank) diff --git a/app/models/epp/epp_domain.rb b/app/models/epp/epp_domain.rb index e3f4f515f..b546c0331 100644 --- a/app/models/epp/epp_domain.rb +++ b/app/models/epp/epp_domain.rb @@ -24,16 +24,16 @@ class Epp::EppDomain < Domain ], '2004' => [ # Parameter value range error [:nameservers, :out_of_range, - { - min: domain_validation_sg.setting(:ns_min_count).value, - max: domain_validation_sg.setting(:ns_max_count).value - } + { + min: domain_validation_sg.setting(:ns_min_count).value, + max: domain_validation_sg.setting(:ns_max_count).value + } ], [:dnskeys, :out_of_range, - { - min: domain_validation_sg.setting(:dnskeys_min_count).value, - max: domain_validation_sg.setting(:dnskeys_max_count).value - } + { + min: domain_validation_sg.setting(:dnskeys_min_count).value, + max: domain_validation_sg.setting(:dnskeys_max_count).value + } ], [:period, :out_of_range, { value: { obj: 'period', val: period } }] ], @@ -71,8 +71,8 @@ class Epp::EppDomain < Domain # TODO: Find out if there are any attributes that can be changed # if not, delete this method - def parse_and_update_domain_attributes(parsed_frame) - #assign_attributes(self.class.parse_update_params_from_frame(parsed_frame)) + def parse_and_update_domain_attributes(_parsed_frame) + # assign_attributes(self.class.parse_update_params_from_frame(parsed_frame)) errors.empty? end diff --git a/app/models/registrar.rb b/app/models/registrar.rb index 8b83c8fb5..72398d878 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -1,14 +1,13 @@ class Registrar < ActiveRecord::Base belongs_to :country - has_many :domains, :dependent => :restrict_with_error - has_many :contacts, :dependent => :restrict_with_error - has_many :epp_users, :dependent => :restrict_with_error - has_many :users, :dependent => :restrict_with_error + has_many :domains, dependent: :restrict_with_error + has_many :contacts, dependent: :restrict_with_error + has_many :epp_users, dependent: :restrict_with_error + has_many :users, dependent: :restrict_with_error validates :name, :reg_no, :address, :country, presence: true validates :name, :reg_no, uniqueness: true - def domain_transfers at = DomainTransfer.arel_table DomainTransfer.where( diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index e1617c587..dd1de6315 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -41,12 +41,12 @@ Devise.setup do |config| # Configure which authentication keys should be case-insensitive. # These keys will be downcased upon creating or modifying a user and when used # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [ :email ] + config.case_insensitive_keys = [:email] # Configure which authentication keys should have whitespace stripped. # These keys will have whitespace before and after removed upon creating or # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [ :email ] + config.strip_whitespace_keys = [:email] # Tell if authentication through request.params is enabled. True by default. # It can be set to an array that will enable params authentication only for the diff --git a/config/routes.rb b/config/routes.rb index ecc89ed61..f0aed11b1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,7 +31,7 @@ Rails.application.routes.draw do root 'domains#index' - end + end ## CLIENT ROUTES namespace(:client) do @@ -66,10 +66,10 @@ Rails.application.routes.draw do end authenticated :user do - root :to => 'admin/domains#index', :as => :authenticated_root + root to: 'admin/domains#index', as: :authenticated_root end - root :to => redirect('login') + root to: redirect('login') # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". diff --git a/lib/tasks/whois.rake b/lib/tasks/whois.rake index bc430194c..d04a7792a 100644 --- a/lib/tasks/whois.rake +++ b/lib/tasks/whois.rake @@ -2,12 +2,12 @@ desc 'Commands for whois' desc 'generate whois files' task 'whois:generate' => :environment do - Dir.mkdir("./tmp/whois") unless File.exists?("./tmp/whois") #a folder for ze stuff + Dir.mkdir('./tmp/whois') unless File.exist?('./tmp/whois') # a folder for ze stuff - alphabet = (("a".."z").to_a << %w(ö õ ü ä) ).flatten! + alphabet = (('a'..'z').to_a << %w(ö õ ü ä)).flatten! @domains = {} alphabet.each do |letter| - domains = Domain.where([ 'name LIKE ?', "#{letter}%" ]) + domains = Domain.where(['name LIKE ?', "#{letter}%"]) @domains[letter] = {} domains.each do |domain| @@ -22,9 +22,8 @@ task 'whois:generate' => :environment do end end - @domains.each do |k,v| + @domains.each do |k, v| file = File.open("tmp/whois/#{k}_domain.yaml", 'w') { |f| f.write(v.to_yaml) } end end - diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index a3ac550af..3a85512cb 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -33,7 +33,7 @@ describe 'EPP Contact', epp: true do expect(response[:result_code]).to eq('1000') expect(response[:msg]).to eq('Command completed successfully') - #expect(response[:clTRID]).to eq('ABC-12345') + # expect(response[:clTRID]).to eq('ABC-12345') expect(Contact.first.created_by_id).to eq 2 expect(Contact.first.updated_by_id).to eq nil diff --git a/spec/epp/domain_spec.rb b/spec/epp/domain_spec.rb index 13c55bbd5..f43005355 100644 --- a/spec/epp/domain_spec.rb +++ b/spec/epp/domain_spec.rb @@ -273,7 +273,7 @@ describe 'EPP Domain', epp: true do xml = domain_create_xml({ ns: [ { hostObj: { value: 'invalid1-' } }, - { hostObj: { value: '-invalid2' } }, + { hostObj: { value: '-invalid2' } } ] }) @@ -314,7 +314,7 @@ describe 'EPP Domain', epp: true do it 'does not create a domain with invalid period' do xml = domain_create_xml({ - period: {value: '367', attrs: { unit: 'd' } } + period: { value: '367', attrs: { unit: 'd' } } }) response = epp_request(xml, :xml) @@ -420,26 +420,26 @@ describe 'EPP Domain', epp: true do end it 'does not create a domain with two identical dnskeys' do - xml = domain_create_xml({ - dnssec: [ - { - dnskey: { - flags: { value: '257' }, - protocol: { value: '3' }, - alg: { value: '3' }, - pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' } - } - }, - { - dnskey: { - flags: { value: '0' }, - protocol: { value: '3' }, - alg: { value: '5' }, - pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' } - } - } - ] - }) + xml = domain_create_xml({ + dnssec: [ + { + dnskey: { + flags: { value: '257' }, + protocol: { value: '3' }, + alg: { value: '3' }, + pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' } + } + }, + { + dnskey: { + flags: { value: '0' }, + protocol: { value: '3' }, + alg: { value: '5' }, + pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' } + } + } + ] + }) response = epp_request(xml, :xml) @@ -580,12 +580,12 @@ describe 'EPP Domain', epp: true do expect(inf_data.css('status').first[:s]).to eq('clientHold') expect(inf_data.css('registrant').text).to eq(d.owner_contact_code) - admin_contacts_from_request = inf_data.css('contact[type="admin"]').map { |x| x.text } + admin_contacts_from_request = inf_data.css('contact[type="admin"]').map(&:text) admin_contacts_existing = d.admin_contacts.pluck(:code) expect(admin_contacts_from_request).to eq(admin_contacts_existing) - hosts_from_request = inf_data.css('hostObj').map { |x| x.text } + hosts_from_request = inf_data.css('hostObj').map(&:text) hosts_existing = d.nameservers.where(ipv4: nil).pluck(:hostname) expect(hosts_from_request).to eq(hosts_existing) diff --git a/spec/epp/epp_helper_spec.rb b/spec/epp/epp_helper_spec.rb index 79f13ec37..c3c0fdedb 100644 --- a/spec/epp/epp_helper_spec.rb +++ b/spec/epp/epp_helper_spec.rb @@ -72,16 +72,16 @@ describe 'EPP Helper', epp: true do xml = domain_create_xml({ name: { value: 'one.ee' }, - period: {value: '345', attrs: { unit: 'd' } }, + period: { value: '345', attrs: { unit: 'd' } }, ns: [ - { hostObj: {value: 'ns1.test.net' } }, - { hostObj: {value: 'ns2.test.net' } } + { hostObj: { value: 'ns1.test.net' } }, + { hostObj: { value: 'ns2.test.net' } } ], registrant: { value: '32fsdaf' }, _other: [ - { contact: {value: '2323rafaf', attrs: { type: 'admin' } } }, - { contact: {value: '3dgxx', attrs: { type: 'tech' } } }, - { contact: {value: '345xxv', attrs: { type: 'tech' } } } + { contact: { value: '2323rafaf', attrs: { type: 'admin' } } }, + { contact: { value: '3dgxx', attrs: { type: 'tech' } } }, + { contact: { value: '345xxv', attrs: { type: 'tech' } } } ] }) @@ -452,7 +452,6 @@ describe 'EPP Helper', epp: true do generated = Nokogiri::XML(domain_delete_xml).to_s.squish expect(generated).to eq(expected) - expected = Nokogiri::XML(' diff --git a/spec/features/client_contact_spec.rb b/spec/features/client_contact_spec.rb index 3f56dccd1..81b5971dd 100644 --- a/spec/features/client_contact_spec.rb +++ b/spec/features/client_contact_spec.rb @@ -1,8 +1,8 @@ require 'rails_helper' feature 'Contact management', type: :feature do - #background do - #end + # background do + # end before(:each) do Fabricate(:user, country: Fabricate(:country, iso: 'EE'), admin: false, username: 'zone') diff --git a/spec/models/contact_spec.rb b/spec/models/contact_spec.rb index f63e2455a..5c88a17f8 100644 --- a/spec/models/contact_spec.rb +++ b/spec/models/contact_spec.rb @@ -74,7 +74,7 @@ end describe Contact, '#up_id' do before(:each) do - #Fabricate(:contact, code: 'asd12', created_by: Fabricate(:epp_user), updated_by: Fabricate(:epp_user), registrar: zone) + # Fabricate(:contact, code: 'asd12', created_by: Fabricate(:epp_user), updated_by: Fabricate(:epp_user), registrar: zone) @epp_user = Fabricate(:epp_user) @contact = Fabricate.build(:contact, code: 'asd12', created_by: @epp_user, updated_by: @epp_user) end