forked from xebia-functional/nine-cards-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We simplify some mocks in the test code, to make it clear that they are mocks and to ensure we do not use any personal information.
- Loading branch information
Showing
11 changed files
with
44 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"email\": \"[email protected]\",\n \"androidId\":\"111a-bbb2-cc3-4444f\",\n \"tokenId\":\"Y29udGVudC5jb20iLCJzdWIiOiIxMDYyMjI2OTM3MTk4N\"\n}" | ||
"raw": "{\n \"email\": \"[email protected]\",\n \"androidId\":\"111a-bbb2-cc3-4444f\",\n \"tokenId\":\"{{OBTAIN_TOKEN_ID}}\"\n}" | ||
}, | ||
"description": "Signs up a client (user and device) within the Nine Cards Backend.\n\nIts response should include the new client's session token and its api key." | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,7 +305,7 @@ For example, a valid request body would be the following one: | |
{ | ||
"email" : "[email protected]", | ||
"androidId" : "1CAFE80C", | ||
"tokenId" : "k23.k1Li4iliMa_" | ||
"tokenId" : "k10.qwertyuiop_" | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,25 +22,23 @@ import spray.http.HttpHeaders.RawHeader | |
|
||
object TestData { | ||
|
||
val androidId = AndroidId("f07a13984f6d116a") | ||
val androidId = AndroidId("aaaaaaaaaaaaaaaa") | ||
|
||
val apiToken = ApiKey("a7db875d-f11e-4b0c-8d7a-db210fd93e1b") | ||
val apiToken = ApiKey("eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee") | ||
|
||
val author = "John Doe" | ||
|
||
val authToken = "c8abd539-d912-4eff-8d3c-679307defc71" | ||
val authToken = "dddddddd-dddd-dddd-dddd-dddddddddddd" | ||
|
||
val category = "SOCIAL" | ||
|
||
val deviceToken = Option(DeviceToken("d897b6f1-c6a9-42bd-bf42-c787883c7d3e")) | ||
val deviceToken = Option(DeviceToken("77777777-7777-7777-7777-777777777777")) | ||
|
||
val email = Email("[email protected]") | ||
|
||
val failingAuthToken = "a439c00e" | ||
val failingAuthToken = "abcdefg" | ||
|
||
val googlePlayToken = "8d8f9814" | ||
|
||
val googleAnalyticsToken = "yada-yada-yada" | ||
val googlePlayToken = "111111111" | ||
|
||
val location = Option("US") | ||
|
||
|
@@ -50,9 +48,7 @@ object TestData { | |
|
||
val moments = List("HOME", "NIGHT") | ||
|
||
val sessionToken = SessionToken("1d1afeea-c7ec-45d8-a6f8-825b836f2785") | ||
|
||
val tokenId = GoogleIdToken("6c7b303e-585e-4fe8-8b6f-586547317331-7f9b12dd-8946-4285-a72a-746e482834dd") | ||
val sessionToken = SessionToken("bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb") | ||
|
||
val userId = 1l | ||
|
||
|
@@ -75,9 +71,6 @@ object TestData { | |
RawHeader(headerAuthToken, failingAuthToken) | ||
) | ||
|
||
val googleAnalyticsHeaders = List( | ||
RawHeader(headerGoogleAnalyticsToken, googleAnalyticsToken) | ||
) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,25 +24,25 @@ import spray.http.HttpHeaders.RawHeader | |
|
||
private[accounts] object TestData { | ||
|
||
val androidId = AndroidId("f07a13984f6d116a") | ||
val androidId = AndroidId("aaaaaaaaaaaaaaaa") | ||
|
||
val apiToken = ApiKey("a7db875d-f11e-4b0c-8d7a-db210fd93e1b") | ||
val apiToken = ApiKey("eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee") | ||
|
||
val authToken = "c8abd539-d912-4eff-8d3c-679307defc71" | ||
val authToken = "aaaaaaaa-bbbb-bbbb-bbbb-cccccccccccc" | ||
|
||
val deviceToken = Option(DeviceToken("d897b6f1-c6a9-42bd-bf42-c787883c7d3e")) | ||
val deviceToken = Option(DeviceToken("77777777-7777-7777-7777-777777777777")) | ||
|
||
val email = Email("[email protected]") | ||
|
||
val failingAuthToken = "a439c00e" | ||
val failingAuthToken = "abcdef012" | ||
|
||
val location = Option("US") | ||
|
||
val now = DateTime.now | ||
|
||
val sessionToken = SessionToken("1d1afeea-c7ec-45d8-a6f8-825b836f2785") | ||
val sessionToken = SessionToken("bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb") | ||
|
||
val tokenId = GoogleIdToken("6c7b303e-585e-4fe8-8b6f-586547317331-7f9b12dd-8946-4285-a72a-746e482834dd") | ||
val tokenId = GoogleIdToken("66666666-6666-6666-6666-666666666666") | ||
|
||
val userId = 1l | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ private[account] trait AccountTestData { | |
|
||
val wrongEmail = Email("[email protected]") | ||
|
||
val tokenId = GoogleIdToken("eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxMjI3MjFlZWQwYjQ1YmUxNWUzMGI2YThhOThjOTM3ZTJlNmQxN") | ||
val tokenId = GoogleIdToken("JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK") | ||
|
||
val tokenInfo = TokenInfo("true", email.value) | ||
|
||
|
@@ -38,21 +38,21 @@ private[account] trait AccountTestData { | |
|
||
val userId = 1l | ||
|
||
val apiKey = "60b32e59-0d87-4705-a454-2e5b38bec13b" | ||
val apiKey = "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" | ||
|
||
val wrongApiKey = "f93cff07-32c9-4995-8e80-a8adfafbf296" | ||
val wrongApiKey = "cccccccc-cccc-cccc-cccc-cccccccccccc" | ||
|
||
val sessionToken = "1d1afeea-c7ec-45d8-a6f8-825b836f2785" | ||
val sessionToken = "dddddddd-dddd-dddd-dddd-dddddddddddd" | ||
|
||
val banned = false | ||
|
||
val user = User(userId, email, SessionToken(sessionToken), ApiKey(apiKey), banned) | ||
|
||
val userNotFoundError = UserNotFound("The user doesn't exist") | ||
|
||
val androidId = "f07a13984f6d116a" | ||
val androidId = "aaaaaaaaaaaaaaaa" | ||
|
||
val googleTokenId = "hd-w2tmEe7SZ_8vXhw_3f1iNnsrAqkpEvbPkFIo9oZeAq26u" | ||
val googleTokenId = "eg-googleTokenId" | ||
|
||
val deviceToken = "abc" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters