@@ -7,6 +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
11
import codecheck .github .models .IssueStateFilter
11
12
import codecheck .github .models .Issue
12
13
import codecheck .github .models .IssueInput
@@ -39,7 +40,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
39
40
assert(result.title == " test issue" )
40
41
assert(result.user.login == user)
41
42
assert(result.labels.head.name == " question" )
42
- assert(result.state == " open" )
43
+ assert(result.state == IssueState . open)
43
44
assert(result.locked == false )
44
45
assert(result.assignee.get.login == user)
45
46
assert(result.comments == 0 )
@@ -61,7 +62,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
61
62
assert(result.title == " test issue" )
62
63
assert(result.user.login == user)
63
64
assert(result.labels.isEmpty) // Label is not set if user is not the organization member.
64
- assert(result.state == " open" )
65
+ assert(result.state == IssueState . open)
65
66
assert(result.locked == false )
66
67
assert(result.assignee.isEmpty) // Assignee is not set if user is not the organization member.
67
68
assert(result.milestone.isEmpty) // Assignee is not set if user is not the organization member.
@@ -172,7 +173,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
172
173
assert(result.title == " test issue edited" )
173
174
assert(result.body.get == " testing again" )
174
175
assert(result.labels.head.name == " bug" )
175
- assert(result.state == " closed" )
176
+ assert(result.state == IssueState . closed)
176
177
assert(result.updated_at.toDateTime(DateTimeZone .UTC ).getMillis() - DateTime .now(DateTimeZone .UTC ).getMillis() <= 5000 )
177
178
}
178
179
@@ -182,7 +183,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
182
183
assert(result.body.get == " testing again" )
183
184
assert(result.milestone.isEmpty)
184
185
assert(result.labels.isEmpty)
185
- assert(result.state == " closed" )
186
+ assert(result.state == IssueState . closed)
186
187
assert(result.updated_at.toDateTime(DateTimeZone .UTC ).getMillis() - DateTime .now(DateTimeZone .UTC ).getMillis() <= 5000 )
187
188
}
188
189
}
0 commit comments