Commit 4f689b2459a093c706d3579ec7db6cd1ea691bba

Authored by Diego Camarinha
Committed by Heitor
1 parent 446e8f02

Fix test that use external connections

Some tests were still trying to access the external servers.

Signed-off-by: Heitor Reis <marcheing@gmail.com>
spec/models/kalibro_configuration_spec.rb
... ... @@ -85,9 +85,9 @@ describe KalibroConfiguration, :type =&gt; :model do
85 85 end
86 86  
87 87 it 'is expected to clean the attributes memoization' do
88   - pending 'broke after kalibro client major update'
89 88 # Call attributes once so it memoizes
90 89 KalibroConfigurationAttributes.expects(:find_by).with(kalibro_configuration_id: kalibro_configuration.id).returns(kalibro_configuration_attributes)
  90 + KalibroClient::Entities::Configurations::KalibroConfiguration.any_instance.expects(:destroy).returns(kalibro_configuration)
91 91 expect(kalibro_configuration.attributes).to eq(kalibro_configuration_attributes)
92 92  
93 93 # Destroying
... ...
spec/models/project_spec.rb
... ... @@ -52,9 +52,9 @@ describe Project, :type =&gt; :model do
52 52 end
53 53  
54 54 it 'is expected to clean the attributes memoization' do
55   - pending 'broke after kalibro client major update'
56 55 # Call attributes once so it memoizes
57 56 ProjectAttributes.expects(:find_by).with(project_id: project.id).returns(project_attributes)
  57 + KalibroClient::Entities::Processor::Project.any_instance.expects(:destroy).returns(project)
58 58 expect(project.attributes).to eq(project_attributes)
59 59  
60 60 # Destroying
... ...
spec/models/reading_group_spec.rb
... ... @@ -59,9 +59,9 @@ describe ReadingGroup, :type =&gt; :model do
59 59 end
60 60  
61 61 it 'is expected to clean the attributes memoization' do
62   - pending 'broke after kalibro client major update'
63 62 # Call attributes once so it memoizes
64 63 ReadingGroupAttributes.expects(:find_by).with(reading_group_id: reading_group.id).returns(reading_group_attributes)
  64 + KalibroClient::Entities::Configurations::ReadingGroup.any_instance.expects(:destroy).returns(reading_group)
65 65 expect(reading_group.attributes).to eq(reading_group_attributes)
66 66  
67 67 # Destroying
... ...