Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public void setShowAsButton(boolean showAsButton) {
* Getter for the domain connection flag.
* @return the domain connection flag.
*/
@JsonProperty("is_domain_connection")
public boolean isDomainConnection() {
return isDomainConnection;
}
Expand All @@ -218,7 +219,8 @@ public boolean isDomainConnection() {
* Setter for the domain connection flag.
* @param domainConnection the domain connection flag to set.
*/
@JsonProperty("is_domain_connection")
public void setDomainConnection(boolean domainConnection) {
isDomainConnection = domainConnection;
this.isDomainConnection = domainConnection;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ public void shouldThrowOnCreateConnectionWithNullData() {

@Test
public void shouldCreateConnection() throws Exception {
Request<Connection> request = api.connections().create(new Connection("my-connection", "auth0"));
Connection createConnection = new Connection("my-connection", "auth0");
createConnection.setDomainConnection(true);
createConnection.setShowAsButton(true);
Request<Connection> request = api.connections().create(createConnection);
assertThat(request, is(notNullValue()));

server.jsonResponse(MGMT_CONNECTION, 200);
Expand All @@ -188,7 +191,7 @@ public void shouldCreateConnection() throws Exception {
assertThat(recordedRequest, hasHeader("Authorization", "Bearer apiToken"));

Map<String, Object> body = bodyFromRequest(recordedRequest);
assertThat(body.size(), is(5));
assertThat(body.size(), is(4));
assertThat(body, hasEntry("name", "my-connection"));
assertThat(body, hasEntry("strategy", "auth0"));

Expand Down Expand Up @@ -244,7 +247,7 @@ public void shouldUpdateConnection() throws Exception {
assertThat(recordedRequest, hasHeader("Authorization", "Bearer apiToken"));

Map<String, Object> body = bodyFromRequest(recordedRequest);
assertThat(body.size(), is(5));
assertThat(body.size(), is(4));
assertThat(body, hasEntry("name", "my-connection"));
assertThat(body, hasEntry("strategy", "auth0"));

Expand Down
8 changes: 5 additions & 3 deletions src/test/resources/mgmt/connection.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb"
],
"metadata": {
"key": "value"
}
}
"key": "value"
},
"is_domain_connection": true,
"show_as_button": true
}
Loading