-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleResult#history_of request is broken #62
Comments
Which key is the best one to use? |
We have tested the module_result class on the KalibroClient project and it is not crashing. How to force this error? |
@marcosddourado, can you provide details of how you've tested it? |
We didn't think that we had to create a test, just modify the used one. like this: before :each do
KalibroClient::Entities::Processor::Repository.
expects(:request).
with(':id/module_result_history_of', {id: repository.id, kalibro_module_id: subject.kalibro_module.id}).
returns({'module_result_history_of' => [[date_module_result.date, date_module_result.module_result.to_hash]]})
end
it 'should return a list of date_module_results' do
date_module_results = KalibroClient::Entities::Processor::ModuleResult.history_of(subject, repository.id)
expect(date_module_results.first.result).to eq date_module_result.result
end As you can we fixed the hashes by getting the value with the right key(module_result_history_of) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
KalibroProcessor returns a hash with the key
module_result_history_of
as you can see here.Currently, KalibroClient is trying to access the key
date_module_results
.The text was updated successfully, but these errors were encountered: