Skip to content
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

Closed
jakzal opened this issue Aug 6, 2012 · 5 comments
Closed

Write unit tests #4

jakzal opened this issue Aug 6, 2012 · 5 comments

Comments

@jakzal
Copy link
Contributor

jakzal commented Aug 6, 2012

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).

@robocoder
Copy link
Member

Please do. I've stubbed somethings as part of a general code cleanup.

@jakzal
Copy link
Contributor Author

jakzal commented Aug 7, 2012

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.

@robocoder
Copy link
Member

At this point, I'm not 100% sure about passing the class name ... it's all in flux until I implement issue #3.

@jakzal
Copy link
Contributor Author

jakzal commented Aug 7, 2012

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.

@jakzal jakzal mentioned this issue Aug 7, 2012
@robocoder
Copy link
Member

Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants