taskadapter / redmine-java-api

Redmine Java API
Apache License 2.0
269 stars 162 forks source link

Add missing params for user creation #313

Closed marob closed 5 years ago

marob commented 5 years ago

Adding parameters listed in the API documentation: http://www.redmine.org/projects/redmine/wiki/Rest_Users#POST

alexeyOnGitHub commented 5 years ago

can you also add tests to verify these parameters are accepted and saved by the server?

marob commented 5 years ago

That would be nice, but there is no current test to verify the impacted code about the parameters being saved by the server or not. The only tests related to the impacted code that I can find are in RedmineJSONBuilderTest, and they merely check that some of the parameters are serialized in JSON.

About checking whether the parameters are saved by the server or not, it would require a running Redmine server, which is not a unit test but an integration test (those I can't run on my side because http://dev.taskadapter.com:8094 is not publicly accessible).

What do you suggest then?

alexeyOnGitHub commented 5 years ago

I booted up Redmine on the URL you mentioned, feel free to use it for tests. see UserIT class for sample User tests.

marob commented 5 years ago

Thanks, but thinking about it, the 3 newly added parameters are "write only", meaning there is no way to check whether they correctly have been taken into account by Redmine because they can't be retrieved by an API endpoint.

Any other idea?

alexeyOnGitHub commented 5 years ago

I see. I am not using Redmine at the moment, so I will have to trust you that these parameters are correct. merging as-is without tests.