From f828432be124ce8a200be628d992decdde676df0 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 29 Jan 2015 16:02:39 +0200 Subject: [PATCH] Comment out old created_by logic --- spec/epp/contact_spec.rb | 13 +++++++------ spec/models/contact_spec.rb | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index d1d08fa27..b31a4aca4 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -68,8 +68,8 @@ describe 'EPP Contact', epp: true do @contact = Contact.last @contact.registrar.should == registrar1 - registrar1.api_users.should include(@contact.created_by) - @contact.updated_by_id.should == nil + # registrar1.api_users.should include(@contact.created_by) + # @contact.updated_by_id.should == nil @contact.ident.should == '37605030299' @contact.address.street.should == '123 Example' @@ -156,7 +156,7 @@ describe 'EPP Contact', epp: true do @contact = Fabricate( :contact, - created_by_id: 1, + # created_by_id: 1, registrar: registrar1, email: 'not_updated@test.test', code: 'sh8013', @@ -216,7 +216,7 @@ describe 'EPP Contact', epp: true do code: 'sh8013disclosure', auth_info: '2fooBAR', registrar: registrar1, - created_by_id: ApiUser.first.id, + # created_by_id: ApiUser.first.id, disclosure: Fabricate(:contact_disclosure, phone: true, email: true)) xml = { @@ -245,7 +245,8 @@ describe 'EPP Contact', epp: true do it 'deletes contact' do @contact_deleted = - Fabricate(:contact, code: 'dwa1234', created_by_id: ApiUser.first.id, registrar: registrar1) + # Fabricate(:contact, code: 'dwa1234', created_by_id: ApiUser.first.id, registrar: registrar1) + Fabricate(:contact, code: 'dwa1234', registrar: registrar1) response = epp_plain_request(delete_contact_xml({ id: { value: 'dwa1234' } }), :xml) response[:msg].should == 'Command completed successfully' @@ -268,7 +269,7 @@ describe 'EPP Contact', epp: true do owner_contact: Fabricate( :contact, code: 'dwa1234', - created_by_id: registrar1.id, + # created_by_id: registrar1.id, registrar: registrar1) ) Domain.last.owner_contact.address.present?.should == true diff --git a/spec/models/contact_spec.rb b/spec/models/contact_spec.rb index 7ea231da0..fe17e43ee 100644 --- a/spec/models/contact_spec.rb +++ b/spec/models/contact_spec.rb @@ -173,23 +173,23 @@ describe Contact do context 'with creator' do before :all do - @contact.created_by = @api_user + # @contact.created_by = @api_user end # TODO: change cr_id to something else it 'should return username of creator' do - @contact.cr_id.should == 'gitlab' + # @contact.cr_id.should == 'gitlab' end end context 'with updater' do before :all do - @contact.updated_by = @api_user + # @contact.updated_by = @api_user end # TODO: change up_id to something else it 'should return username of updater' do - @contact.up_id.should == 'gitlab' + # @contact.up_id.should == 'gitlab' end end