Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PMRMS Auth
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ghitha Dinan
PMRMS Auth
Commits
c9198993
Commit
c9198993
authored
Jan 10, 2022
by
Ghitha Dinan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add unit test
parent
33c81657
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
AuthServiceTest.kt
...tlin/id/go/kemenag/madrasah/pmrms/auth/AuthServiceTest.kt
+30
-0
No files found.
src/test/kotlin/id/go/kemenag/madrasah/pmrms/auth/AuthServiceTest.kt
0 → 100644
View file @
c9198993
package
id.go.kemenag.madrasah.pmrms.auth
import
id.go.kemenag.madrasah.pmrms.auth.model.request.auth.LoginRequest
import
id.go.kemenag.madrasah.pmrms.auth.model.response.ReturnData
import
id.go.kemenag.madrasah.pmrms.auth.service.AuthService
import
org.assertj.core.api.Assertions
import
org.junit.jupiter.api.Test
import
org.springframework.beans.factory.annotation.Autowired
import
org.springframework.boot.test.context.SpringBootTest
import
org.springframework.http.HttpStatus
import
org.springframework.http.ResponseEntity
@SpringBootTest
class
AuthServiceTest
{
@Autowired
private
lateinit
var
service
:
AuthService
@Test
fun
testLogin
()
{
val
test
:
ResponseEntity
<
ReturnData
>
=
service
.
login
(
LoginRequest
(
"admin@madrasah.kemenag.go.id"
,
"123456"
))
Assertions
.
assertThat
(
test
.
statusCode
).
isNotEqualTo
(
HttpStatus
.
INTERNAL_SERVER_ERROR
)
}
@Test
fun
testDetail
()
{
val
test
:
ResponseEntity
<
ReturnData
>
=
service
.
detail
()
Assertions
.
assertThat
(
test
.
statusCode
).
isNotEqualTo
(
HttpStatus
.
INTERNAL_SERVER_ERROR
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment