Skip to content

Commit 4de4e0a

Browse files
committed
Add a test and fix the attribute name
1 parent b36eea5 commit 4de4e0a

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

gitlab4j-models/src/main/java/org/gitlab4j/api/models/PullMirror.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class PullMirror implements Serializable {
1313
private Date lastSuccessfulUpdateAt;
1414
private Date lastUpdateAt;
1515
private Date lastUpdateStartedAt;
16-
private String updatedStatus;
16+
private String updateStatus;
1717
private String url;
1818
private Boolean enabled;
1919
private Boolean mirrorTriggerBuilds;
@@ -61,12 +61,12 @@ public void setLastUpdateStartedAt(Date lastUpdateStartedAt) {
6161
this.lastUpdateStartedAt = lastUpdateStartedAt;
6262
}
6363

64-
public String getUpdatedStatus() {
65-
return updatedStatus;
64+
public String getUpdateStatus() {
65+
return updateStatus;
6666
}
6767

68-
public void setUpdatedStatus(String updatedStatus) {
69-
this.updatedStatus = updatedStatus;
68+
public void setUpdateStatus(String updateStatus) {
69+
this.updateStatus = updateStatus;
7070
}
7171

7272
public String getUrl() {

gitlab4j-models/src/test/java/org/gitlab4j/models/TestGitLabApiBeans.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,12 @@ public void testPushRule() throws Exception {
507507
assertTrue(compareJson(pushRule, "push-rule.json"));
508508
}
509509

510+
@Test
511+
public void testPullMirror() throws Exception {
512+
PullMirror value = unmarshalResource(PullMirror.class, "pull-mirror.json");
513+
assertTrue(compareJson(value, "pull-mirror.json"));
514+
}
515+
510516
@Test
511517
public void testRegistryRepositories() throws Exception {
512518
List<RegistryRepository> repos = unmarshalResourceList(RegistryRepository.class, "registry-repositories.json");
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": 101486,
3+
"last_error": "FOO",
4+
"last_successful_update_at": "2020-01-06T17:32:02.823Z",
5+
"last_update_at": "2020-01-06T17:32:02.823Z",
6+
"last_update_started_at": "2020-01-06T17:31:55.864Z",
7+
"update_status": "finished",
8+
"url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git",
9+
"enabled": true,
10+
"mirror_trigger_builds": true,
11+
"only_mirror_protected_branches": true,
12+
"mirror_overwrites_diverged_branches": false,
13+
"mirror_branch_regex": "[a-z]+"
14+
}

0 commit comments

Comments
 (0)