-
Notifications
You must be signed in to change notification settings - Fork 18
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
Write unit tests #4
Comments
Please do. I've stubbed somethings as part of a general code cleanup. |
Do you think passing a class name is the way to go? I'd just pass an instance of SoapClient to JiraService (it's still not possible to mock it in an unit test). Anyway, I'll prepare PR and you'll see if you like it. |
At this point, I'm not 100% sure about passing the class name ... it's all in flux until I implement issue #3. |
Ok, in such case I'll send a PR now. I didn't write all the tests yet but it'd be great if I got some feedback. |
Thanks for the PR. |
Currently the extension is not covered by unit tests. I could work on it but first I need to know you'll accept my PR ;)
I have one small suggestion. JiraService is not easy to unit test since it creates SoapClient directly inside the connect() method. We should rather pass an instance of SoapClient in JiraService's constructor or make that JiraService extends the SoapClient.
I also suggest that instead of hard coding the "/rpc/soap/jirasoapservice-v2?wsdl" part in the JiraService we make it configurable (as part of host, might be good to change the name of the config variable, i.e. wsdl_url).
The text was updated successfully, but these errors were encountered: