@@ -173,7 +173,7 @@ public void testUpdate() throws GitLabApiException {
173173 public void testListSnippets () throws GitLabApiException {
174174
175175 String title = TEST_SNIPPET_TITLE_PREFIX + "Test listSnippets()" ;
176- String filename = "test-update-snippet .js" ;
176+ String filename = "test-list-snippets .js" ;
177177 String description = null ;
178178 String code = "window.open();" ;
179179 Visibility visibility = Visibility .INTERNAL ;
@@ -196,7 +196,7 @@ public void testListSnippets() throws GitLabApiException {
196196 public void testDeleteSnippet () throws GitLabApiException {
197197
198198 String title = TEST_SNIPPET_TITLE_PREFIX + "Test listSnippets()" ;
199- String filename = "test-update -snippet.js" ;
199+ String filename = "test-delete -snippet.js" ;
200200 String description = null ;
201201 String code = "window.open();" ;
202202 Visibility visibility = Visibility .INTERNAL ;
@@ -214,4 +214,19 @@ public void testDeleteSnippet() throws GitLabApiException {
214214 }
215215 }
216216 }
217+
218+ @ Test
219+ public void testSnippetContent () throws GitLabApiException {
220+
221+ String title = TEST_SNIPPET_TITLE_PREFIX + "Test getRawSnippetContent()" ;
222+ String filename = "test-raw-snippet.js" ;
223+ String description = null ;
224+ String code = "window.open();" ;
225+ Visibility visibility = Visibility .PUBLIC ;
226+ Snippet createdSnippet = createSnippet (title , filename , description , code , visibility );
227+ assertNotNull (createdSnippet );
228+
229+ String rawContent = gitLabApi .getProjectApi ().getRawSnippetContent (testProjectId , createdSnippet .getId ());
230+ assertEquals (code , rawContent );
231+ }
217232}
0 commit comments