Skip to content

Commit e958349

Browse files
committed
Added test for search results (#425).
1 parent 5999be9 commit e958349

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
import org.gitlab4j.api.models.RegistryRepository;
8484
import org.gitlab4j.api.models.Runner;
8585
import org.gitlab4j.api.models.RunnerDetail;
86+
import org.gitlab4j.api.models.SearchBlob;
8687
import org.gitlab4j.api.models.Session;
8788
import org.gitlab4j.api.models.Snippet;
8889
import org.gitlab4j.api.models.SshKey;
@@ -545,4 +546,10 @@ public void testLabels() throws Exception {
545546
List<Label> labels = unmarshalResourceList(Label.class, "labels.json");
546547
assertTrue(compareJson(labels, "labels.json"));
547548
}
549+
550+
@Test
551+
public void testSearchBlobs() throws Exception {
552+
List<SearchBlob> searchResults = unmarshalResourceList(SearchBlob.class, "wiki-blobs.json");
553+
assertTrue(compareJson(searchResults, "wiki-blobs.json"));
554+
}
548555
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"basename": "home",
4+
"data": "hello\n\nand bye\n\nend",
5+
"filename": "home.md",
6+
"id": 123,
7+
"ref": "master",
8+
"startline": 5,
9+
"project_id": 6
10+
}
11+
]

0 commit comments

Comments
 (0)