-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add spec tests for api_fetch function #149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start. We probably want something related to timeouts and other issues as well to make sure we understand how that is handled.
@@ -174,7 +182,15 @@ | |||
context "when #{var_name} (#{type}) is set to valid #{valid} (as #{valid.class})" do | |||
let(:params) { [mandatory_params, var[:params], { "#{var_name}": valid, }].reduce(:merge) } | |||
|
|||
it { is_expected.to compile } | |||
it do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to have tests as well on what happens if we do not get a proper answer from function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is applicable in a different spec file though. Maybe these tests already exists? Don't remember :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, these use cases are included in spec/classes/init_spec.rb
Added new test use case which checks timeout |
I'll merge these changes. Thanks. |
No description provided.