Skip to content

Commit

Permalink
Added test for search results (gitlab4j#425).
Browse files Browse the repository at this point in the history
  • Loading branch information
gmessner committed Sep 16, 2019
1 parent 5999be9 commit e958349
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import org.gitlab4j.api.models.RegistryRepository;
import org.gitlab4j.api.models.Runner;
import org.gitlab4j.api.models.RunnerDetail;
import org.gitlab4j.api.models.SearchBlob;
import org.gitlab4j.api.models.Session;
import org.gitlab4j.api.models.Snippet;
import org.gitlab4j.api.models.SshKey;
Expand Down Expand Up @@ -545,4 +546,10 @@ public void testLabels() throws Exception {
List<Label> labels = unmarshalResourceList(Label.class, "labels.json");
assertTrue(compareJson(labels, "labels.json"));
}

@Test
public void testSearchBlobs() throws Exception {
List<SearchBlob> searchResults = unmarshalResourceList(SearchBlob.class, "wiki-blobs.json");
assertTrue(compareJson(searchResults, "wiki-blobs.json"));
}
}
11 changes: 11 additions & 0 deletions src/test/resources/org/gitlab4j/api/wiki-blobs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"basename": "home",
"data": "hello\n\nand bye\n\nend",
"filename": "home.md",
"id": 123,
"ref": "master",
"startline": 5,
"project_id": 6
}
]

0 comments on commit e958349

Please sign in to comment.