diff options
author | Vyatcheslav Suharnikov <arz.freezy@gmail.com> | 2017-07-13 05:55:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 05:55:28 +0300 |
commit | 3d902b5197db861c30325c159dc10cfb211ae209 (patch) | |
tree | d95187e353f2b03644ec02d8a92711ce9ec69efb /src/test | |
parent | 7ab16021fe2b7e1f7d9d7800458e737d015e7630 (diff) | |
parent | e2313321736520e6acaeb9aaa6ab426e6a8415ff (diff) | |
download | rest-query-3d902b5197db861c30325c159dc10cfb211ae209.tar.gz rest-query-3d902b5197db861c30325c159dc10cfb211ae209.tar.bz2 rest-query-3d902b5197db861c30325c159dc10cfb211ae209.zip |
Merge pull request #6 from drivergroup/PDSUI-2018v0.1.24
PDSUI-2018 Change user type from LongId to StringId
Diffstat (limited to 'src/test')
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/scala/xyz/driver/pdsuicommon/BaseSuite.scala b/src/test/scala/xyz/driver/pdsuicommon/BaseSuite.scala index 71f8ebf..1cfb70b 100644 --- a/src/test/scala/xyz/driver/pdsuicommon/BaseSuite.scala +++ b/src/test/scala/xyz/driver/pdsuicommon/BaseSuite.scala @@ -6,7 +6,7 @@ import org.scalatest.FreeSpecLike import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Span} import xyz.driver.pdsuicommon.db._ -import xyz.driver.pdsuicommon.domain.{Email, LongId, PasswordHash, User} +import xyz.driver.pdsuicommon.domain._ import xyz.driver.pdsuicommon.error.UnexpectedFilterException import xyz.driver.pdsuicommon.utils.DiffUtils @@ -16,7 +16,7 @@ trait BaseSuite extends FreeSpecLike with DiffUtils with ScalaFutures { implicit val sqlContext = new MockMySqlContext() def sampleUser(role: User.Role, email: String = "test@example.com", password: String = "123") = User( - id = LongId(2001), + id = StringId("2001"), email = Email(email), name = "Test", role = role, diff --git a/src/test/scala/xyz/driver/pdsuicommon/db/QueryBuilderParametersSuite.scala b/src/test/scala/xyz/driver/pdsuicommon/db/QueryBuilderParametersSuite.scala index df8e417..2c23b92 100644 --- a/src/test/scala/xyz/driver/pdsuicommon/db/QueryBuilderParametersSuite.scala +++ b/src/test/scala/xyz/driver/pdsuicommon/db/QueryBuilderParametersSuite.scala @@ -5,7 +5,7 @@ import java.time.LocalDateTime import io.getquill.MysqlEscape import org.scalatest.FreeSpecLike import xyz.driver.pdsuicommon.db.QueryBuilder.TableData -import xyz.driver.pdsuicommon.domain.{Email, LongId, User} +import xyz.driver.pdsuicommon.domain._ class QueryBuilderParametersSuite extends FreeSpecLike { @@ -20,7 +20,7 @@ class QueryBuilderParametersSuite extends FreeSpecLike { case class Entity(id: LongId[Entity], name: String, email: Email, - optionUser: Option[LongId[User]], + optionUser: Option[StringId[User]], date: LocalDateTime, optionDate: Option[LocalDateTime], kindId: Long) diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/ApiPartialDocumentSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/ApiPartialDocumentSuite.scala index 7fe1658..2ae52f9 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/ApiPartialDocumentSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/ApiPartialDocumentSuite.scala @@ -126,7 +126,7 @@ class ApiPartialDocumentSuite extends FreeSpecLike { val apiPartialDocument = apiPartialDocumentExample.copy(assignee = newAssignee) val newDocument = apiPartialDocument.applyTo(origDocument) - assert(newDocument.assignee === newAssignee.toOption.map(LongId[User])) + assert(newDocument.assignee === newAssignee.toOption.map(StringId[User])) } } |