From 4f689b2459a093c706d3579ec7db6cd1ea691bba Mon Sep 17 00:00:00 2001 From: Diego Araújo Date: Thu, 1 Oct 2015 13:54:41 -0300 Subject: [PATCH] Fix test that use external connections --- spec/models/kalibro_configuration_spec.rb | 2 +- spec/models/project_spec.rb | 2 +- spec/models/reading_group_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/kalibro_configuration_spec.rb b/spec/models/kalibro_configuration_spec.rb index cccce1e..8f61484 100644 --- a/spec/models/kalibro_configuration_spec.rb +++ b/spec/models/kalibro_configuration_spec.rb @@ -85,9 +85,9 @@ describe KalibroConfiguration, :type => :model do end it 'is expected to clean the attributes memoization' do - pending 'broke after kalibro client major update' # Call attributes once so it memoizes KalibroConfigurationAttributes.expects(:find_by).with(kalibro_configuration_id: kalibro_configuration.id).returns(kalibro_configuration_attributes) + KalibroClient::Entities::Configurations::KalibroConfiguration.any_instance.expects(:destroy).returns(kalibro_configuration) expect(kalibro_configuration.attributes).to eq(kalibro_configuration_attributes) # Destroying diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index c3c2874..9b12493 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -52,9 +52,9 @@ describe Project, :type => :model do end it 'is expected to clean the attributes memoization' do - pending 'broke after kalibro client major update' # Call attributes once so it memoizes ProjectAttributes.expects(:find_by).with(project_id: project.id).returns(project_attributes) + KalibroClient::Entities::Processor::Project.any_instance.expects(:destroy).returns(project) expect(project.attributes).to eq(project_attributes) # Destroying diff --git a/spec/models/reading_group_spec.rb b/spec/models/reading_group_spec.rb index e2b5325..08d8e66 100644 --- a/spec/models/reading_group_spec.rb +++ b/spec/models/reading_group_spec.rb @@ -59,9 +59,9 @@ describe ReadingGroup, :type => :model do end it 'is expected to clean the attributes memoization' do - pending 'broke after kalibro client major update' # Call attributes once so it memoizes ReadingGroupAttributes.expects(:find_by).with(reading_group_id: reading_group.id).returns(reading_group_attributes) + KalibroClient::Entities::Configurations::ReadingGroup.any_instance.expects(:destroy).returns(reading_group) expect(reading_group.attributes).to eq(reading_group_attributes) # Destroying -- libgit2 0.21.2