File tree Expand file tree Collapse file tree 4 files changed +114
-2
lines changed Expand file tree Collapse file tree 4 files changed +114
-2
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,9 @@ export class IssueComments {
244
244
params : {
245
245
expand : parameters . expand ,
246
246
} ,
247
- data : parameters . body ,
247
+ data : {
248
+ body : parameters . body ,
249
+ } ,
248
250
} ;
249
251
250
252
return this . client . sendRequest ( config , callback ) ;
Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ export class IssueComments {
245
245
notifyUsers : parameters . notifyUsers ,
246
246
expand : parameters . expand ,
247
247
} ,
248
- data : parameters . body ,
248
+ data : {
249
+ body : parameters . body ,
250
+ } ,
249
251
} ;
250
252
251
253
return this . client . sendRequest ( config , callback ) ;
Original file line number Diff line number Diff line change
1
+ import {
2
+ cleanupEnvironment ,
3
+ getVersion2Client ,
4
+ prepareEnvironment ,
5
+ } from '../utils' ;
6
+ import { Constants } from '../constants' ;
7
+
8
+ describe ( 'IssueAttachments' , ( ) => {
9
+ beforeAll ( async ( ) => {
10
+ await prepareEnvironment ( ) ;
11
+ } ) ;
12
+
13
+ afterAll ( async ( ) => {
14
+ await cleanupEnvironment ( ) ;
15
+ } ) ;
16
+
17
+ it ( 'should update comment' , async ( ) => {
18
+ const client = getVersion2Client ( { noCheckAtlassianToken : true } ) ;
19
+
20
+ const issue = await client . issues . createIssue ( {
21
+ fields : {
22
+ summary : 'Issue with comments' ,
23
+ project : {
24
+ key : Constants . testProjectKey ,
25
+ } ,
26
+ issuetype : {
27
+ name : 'Task' ,
28
+ } ,
29
+ } ,
30
+ } ) ;
31
+
32
+ expect ( issue ) . toBeDefined ( ) ;
33
+
34
+ const comment = await client . issueComments . addComment ( {
35
+ issueIdOrKey : issue . key ,
36
+ body : 'this is a comment' ,
37
+ } ) ;
38
+
39
+ expect ( comment ) . toBeDefined ( ) ;
40
+
41
+ const updatedComment = await client . issueComments . updateComment ( {
42
+ issueIdOrKey : issue . key ,
43
+ id : comment . id ,
44
+ body : 'updated comment' ,
45
+ } ) ;
46
+
47
+ expect ( updatedComment ) . toBeDefined ( ) ;
48
+ expect ( updatedComment . id ) . toEqual ( comment . id ) ;
49
+
50
+ await client . issues . deleteIssue ( {
51
+ issueIdOrKey : issue . key ,
52
+ } ) ;
53
+ } ) ;
54
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import {
2
+ cleanupEnvironment ,
3
+ getVersion3Client ,
4
+ prepareEnvironment ,
5
+ } from '../utils' ;
6
+ import { Constants } from '../constants' ;
7
+
8
+ describe ( 'IssueAttachments' , ( ) => {
9
+ beforeAll ( async ( ) => {
10
+ await prepareEnvironment ( ) ;
11
+ } ) ;
12
+
13
+ afterAll ( async ( ) => {
14
+ await cleanupEnvironment ( ) ;
15
+ } ) ;
16
+
17
+ it ( 'should update comment' , async ( ) => {
18
+ const client = getVersion3Client ( { noCheckAtlassianToken : true } ) ;
19
+
20
+ const issue = await client . issues . createIssue ( {
21
+ fields : {
22
+ summary : 'Issue with comments' ,
23
+ project : {
24
+ key : Constants . testProjectKey ,
25
+ } ,
26
+ issuetype : {
27
+ name : 'Task' ,
28
+ } ,
29
+ } ,
30
+ } ) ;
31
+
32
+ expect ( issue ) . toBeDefined ( ) ;
33
+
34
+ const comment = await client . issueComments . addComment ( {
35
+ issueIdOrKey : issue . key ,
36
+ body : 'this is a comment' ,
37
+ } ) ;
38
+
39
+ expect ( comment ) . toBeDefined ( ) ;
40
+
41
+ const updatedComment = await client . issueComments . updateComment ( {
42
+ issueIdOrKey : issue . key ,
43
+ id : comment . id ,
44
+ body : 'updated comment' ,
45
+ } ) ;
46
+
47
+ expect ( updatedComment ) . toBeDefined ( ) ;
48
+ expect ( updatedComment . id ) . toEqual ( comment . id ) ;
49
+
50
+ await client . issues . deleteIssue ( {
51
+ issueIdOrKey : issue . key ,
52
+ } ) ;
53
+ } ) ;
54
+ } ) ;
You can’t perform that action at this time.
0 commit comments