@@ -7,7 +7,7 @@ import org.joda.time.DateTimeZone
7
7
import codecheck .github .models .IssueListOption
8
8
import codecheck .github .models .IssueFilter
9
9
import codecheck .github .models .IssueListOption4Repository
10
- import codecheck .github .models .IssueState
10
+ import codecheck .github .models .IssueStateFilter
11
11
import codecheck .github .models .Issue
12
12
import codecheck .github .models .IssueInput
13
13
import codecheck .github .models .MilestoneSearchOption
@@ -116,7 +116,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
116
116
}
117
117
118
118
it(" shold return only two issues when using options." ) {
119
- val option = IssueListOption (IssueFilter .created, IssueState .open, Seq (" question" ), since= Some (nTime))
119
+ val option = IssueListOption (IssueFilter .created, IssueStateFilter .open, Seq (" question" ), since= Some (nTime))
120
120
val result = Await .result(api.listAllIssues(option), TIMEOUT )
121
121
assert(result.length > 0 )
122
122
assert(result.head.title == " test issue" )
@@ -130,7 +130,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
130
130
}
131
131
132
132
it(" shold return only one issues when using options." ) {
133
- val option = IssueListOption (IssueFilter .created, IssueState .open, Seq (" question" ), since= Some (nTime))
133
+ val option = IssueListOption (IssueFilter .created, IssueStateFilter .open, Seq (" question" ), since= Some (nTime))
134
134
val result = Await .result(api.listUserIssues(option), TIMEOUT )
135
135
assert(result.length > 0 )
136
136
assert(result.head.title == " test issue" )
@@ -149,23 +149,23 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
149
149
}
150
150
151
151
it(" should return only one issue from user's own repo when using options." ) {
152
- val option = new IssueListOption4Repository (Some (MilestoneSearchOption (1 )), IssueState .open, Some (user), Some (user), labels= Seq (" question" ), since= Some (nTime))
152
+ val option = new IssueListOption4Repository (Some (MilestoneSearchOption (1 )), IssueStateFilter .open, Some (user), Some (user), labels= Seq (" question" ), since= Some (nTime))
153
153
val result = Await .result(api.listRepositoryIssues(user, userRepo, option), TIMEOUT )
154
154
// showResponse(option.q)
155
155
assert(result.length == 1 )
156
156
assert(result.head.title == " test issue" )
157
157
}
158
158
159
159
it(" should return only one issue from organization's repo when using options." ) {
160
- val option = new IssueListOption4Repository (None , IssueState .open, None , Some (user), labels= Nil , since= Some (nTime))
160
+ val option = new IssueListOption4Repository (None , IssueStateFilter .open, None , Some (user), labels= Nil , since= Some (nTime))
161
161
val result = Await .result(api.listRepositoryIssues(organization, tRepo, option), TIMEOUT )
162
162
assert(result.length == 1 )
163
163
assert(result.head.title == " test issue" )
164
164
}
165
165
}
166
166
167
167
describe(" editIssue(owner, repo, number, input)" ) {
168
- val input = IssueInput (Some (" test issue edited" ), Some (" testing again" ), Some (user), None , Seq (" question" , " bug" ), Some (IssueState .closed))
168
+ val input = IssueInput (Some (" test issue edited" ), Some (" testing again" ), Some (user), None , Seq (" question" , " bug" ), Some (IssueStateFilter .closed))
169
169
170
170
it(" should edit the issue in user's own repo." ) {
171
171
val result = Await .result(api.editIssue(user, userRepo, nUser, input), TIMEOUT )
0 commit comments