@@ -7,6 +7,7 @@ import org.joda.time.DateTimeZone
77import codecheck .github .models .IssueListOption
88import codecheck .github .models .IssueFilter
99import codecheck .github .models .IssueListOption4Repository
10+ import codecheck .github .models .IssueState
1011import codecheck .github .models .IssueStateFilter
1112import codecheck .github .models .Issue
1213import codecheck .github .models .IssueInput
@@ -39,7 +40,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
3940 assert(result.title == " test issue" )
4041 assert(result.user.login == user)
4142 assert(result.labels.head.name == " question" )
42- assert(result.state == " open" )
43+ assert(result.state == IssueState . open)
4344 assert(result.locked == false )
4445 assert(result.assignee.get.login == user)
4546 assert(result.comments == 0 )
@@ -61,7 +62,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
6162 assert(result.title == " test issue" )
6263 assert(result.user.login == user)
6364 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)
6566 assert(result.locked == false )
6667 assert(result.assignee.isEmpty) // Assignee is not set if user is not the organization member.
6768 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 {
172173 assert(result.title == " test issue edited" )
173174 assert(result.body.get == " testing again" )
174175 assert(result.labels.head.name == " bug" )
175- assert(result.state == " closed" )
176+ assert(result.state == IssueState . closed)
176177 assert(result.updated_at.toDateTime(DateTimeZone .UTC ).getMillis() - DateTime .now(DateTimeZone .UTC ).getMillis() <= 5000 )
177178 }
178179
@@ -182,7 +183,7 @@ class IssueOpSpec extends FunSpec with Constants with BeforeAndAfterAll {
182183 assert(result.body.get == " testing again" )
183184 assert(result.milestone.isEmpty)
184185 assert(result.labels.isEmpty)
185- assert(result.state == " closed" )
186+ assert(result.state == IssueState . closed)
186187 assert(result.updated_at.toDateTime(DateTimeZone .UTC ).getMillis() - DateTime .now(DateTimeZone .UTC ).getMillis() <= 5000 )
187188 }
188189 }
0 commit comments