@@ -103,7 +103,7 @@ interface JiraIssueOperatorTest<JiraFieldType> : BaseTestConfigProvider<JiraFiel
103103 loginAsUser(" EveTheEvilHacker" )
104104 runBlocking {
105105 val error = issueOperator.getIssueByKey(issueKey, ::issueParser).assertLeft()
106- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
106+ assertThat(error.message, containsString(" 401 " ))
107107 }
108108 }
109109
@@ -112,7 +112,7 @@ interface JiraIssueOperatorTest<JiraFieldType> : BaseTestConfigProvider<JiraFiel
112112 loginAsUser(" EveTheEvilHacker" )
113113 runBlocking {
114114 val error = issueOperator.getIssueByJQL(" summary ~ \" Test-1\" " , ::issueParser).assertLeft()
115- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
115+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " ) ))
116116 }
117117 }
118118
@@ -121,7 +121,7 @@ interface JiraIssueOperatorTest<JiraFieldType> : BaseTestConfigProvider<JiraFiel
121121 loginAsUser(" EveTheEvilHacker" )
122122 runBlocking {
123123 val error = issueOperator.getIssuesByJQL(" summary ~ \" Test-1\" " , ::issueParser).assertLeft()
124- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ) )
124+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " )) )
125125 }
126126 }
127127
@@ -130,23 +130,23 @@ interface JiraIssueOperatorTest<JiraFieldType> : BaseTestConfigProvider<JiraFiel
130130 loginAsUser(" EveTheEvilHacker" )
131131 runBlocking {
132132 val error = issueOperator.getIssuesByJQLPaginated(" summary ~ \" Test-1\" " , 0 , 1 , ::issueParser).assertLeft()
133- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
133+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " ) ))
134134 }
135135 }
136136 @Test
137137 fun issues_03eGetIssuesByIssueTypeWithoutPermission () {
138138 loginAsUser(" EveTheEvilHacker" )
139139 runBlocking {
140140 val error = issueOperator.getIssuesByIssueType(projectId, issueTypeId, ::issueParser).assertLeft()
141- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
141+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " ) ))
142142 }
143143 }
144144 @Test
145145 fun issues_03fGetIssuesByTypePaginatedWithoutPermission () {
146146 loginAsUser(" EveTheEvilHacker" )
147147 runBlocking {
148148 val error = issueOperator.getIssuesByTypePaginated(projectId, issueTypeId, 0 , 1 , ::issueParser).assertLeft()
149- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
149+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " ) ))
150150 }
151151 }
152152
@@ -320,23 +320,23 @@ interface JiraIssueOperatorTest<JiraFieldType> : BaseTestConfigProvider<JiraFiel
320320 fun issues_07CreateIssueWithoutPermission () {
321321 loginAsUser(" EveTheEvilHacker" )
322322 val error = runBlocking { issueOperator.createIssue(projectId, issueTypeId, listOf ()) }.assertLeft()
323- assertThat(error.message, anyOf(containsString(" Anonymous users do not have permission to create issues in this project. Please try logging in first. " )))
323+ assertThat(error.message, anyOf(containsString(" 401 " ), containsString( " 400 " )))
324324 }
325325
326326 @Test
327327 fun issues_07xUpdateIssueWithourPermission () {
328328 val issue = runBlocking { issueOperator.getIssueByJQL(" summary ~ \" MyNewSummary\" " , ::issueParser) }.orFail()
329329 loginAsUser(" EveTheEvilHacker" )
330330 val error = runBlocking { issueOperator.updateIssue(projectId, issueTypeId, issue.key, listOf ()) }.assertLeft()
331- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
331+ assertThat(error.message, anyOf( containsString(" 401 " ), containsString( " 400 " ) ))
332332 }
333333
334334 @Test
335335 fun issues_07xDeleteIssueWithoutPermission () { // throwable wtf
336336 val issue = runBlocking { issueOperator.getIssueByJQL(" summary ~ \" MyNewSummary\" " , ::issueParser) }.orFail()
337337 loginAsUser(" EveTheEvilHacker" )
338338 val error = runBlocking { issueOperator.deleteIssue(issue.key) }.assertLeft()
339- assertThat(error.message, containsString(" You do not have the permission to see the specified issue. " ))
339+ assertThat(error.message, containsString(" 401 " ))
340340 }
341341
342342 @Test
0 commit comments