@@ -173,7 +173,7 @@ public void testUpdate() throws GitLabApiException {
173
173
public void testListSnippets () throws GitLabApiException {
174
174
175
175
String title = TEST_SNIPPET_TITLE_PREFIX + "Test listSnippets()" ;
176
- String filename = "test-update-snippet .js" ;
176
+ String filename = "test-list-snippets .js" ;
177
177
String description = null ;
178
178
String code = "window.open();" ;
179
179
Visibility visibility = Visibility .INTERNAL ;
@@ -196,7 +196,7 @@ public void testListSnippets() throws GitLabApiException {
196
196
public void testDeleteSnippet () throws GitLabApiException {
197
197
198
198
String title = TEST_SNIPPET_TITLE_PREFIX + "Test listSnippets()" ;
199
- String filename = "test-update -snippet.js" ;
199
+ String filename = "test-delete -snippet.js" ;
200
200
String description = null ;
201
201
String code = "window.open();" ;
202
202
Visibility visibility = Visibility .INTERNAL ;
@@ -214,4 +214,19 @@ public void testDeleteSnippet() throws GitLabApiException {
214
214
}
215
215
}
216
216
}
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
+ }
217
232
}
0 commit comments