mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-17 02:18:38 +00:00
ApiVersion cannot be set to something less than 1
This commit is contained in:
parent
deee2ac0b1
commit
b08edf9010
2 changed files with 15 additions and 3 deletions
|
@ -61,6 +61,18 @@ public class RundeckClientTest {
|
|||
|
||||
private RundeckClient client;
|
||||
|
||||
@Test
|
||||
public void apiVersionDefaultLatest() {
|
||||
RundeckClient blah = createClient("blah", 0);
|
||||
Assert.assertEquals("/api/" + RundeckClient.API_VERSION, blah.getApiEndpoint());
|
||||
Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion());
|
||||
blah.setApiVersion(0);
|
||||
Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion());
|
||||
blah.setApiVersion(-1);
|
||||
Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion());
|
||||
blah.setApiVersion(RundeckClient.Version.V9.getVersionNumber());
|
||||
Assert.assertEquals(RundeckClient.Version.V9.getVersionNumber(), blah.getApiVersion());
|
||||
}
|
||||
@Test
|
||||
@Betamax(tape = "get_projects")
|
||||
public void getProjects() throws Exception {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue