Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xx messenger iOS
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
xx messenger iOS
Commits
09426404
Commit
09426404
authored
2 years ago
by
Bruno Muniz
Browse files
Options
Downloads
Patches
Plain Diff
Finished cleaning integration except fT
parent
1f834bd7
No related branches found
No related tags found
2 merge requests
!40
v1.1.2b166
,
!38
Using new database structure
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/Integration/Mocks/BindingsMock.swift
+44
-43
44 additions, 43 deletions
Sources/Integration/Mocks/BindingsMock.swift
Sources/Integration/Mocks/UserDiscoveryMock.swift
+12
-11
12 additions, 11 deletions
Sources/Integration/Mocks/UserDiscoveryMock.swift
with
56 additions
and
54 deletions
Sources/Integration/Mocks/BindingsMock.swift
+
44
−
43
View file @
09426404
...
...
@@ -188,12 +188,12 @@ public final class BindingsMock: BindingsInterface {
extension
Group
{
static
let
mockGroup
=
Group
(
leader
:
"mockGroup
Leader
"
.
data
(
using
:
.
utf8
)
!
,
id
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
,
name
:
"Bruno's birthday 6/1"
,
groupId
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
,
status
:
.
pending
,
leaderId
:
"mockGroupLeader"
.
data
(
using
:
.
utf8
)
!
,
createdAt
:
Date
.
distantPast
,
serialize
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
authStatus
:
.
pending
,
serialized
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
)
}
...
...
@@ -202,17 +202,18 @@ extension Contact {
var
mocks
=
[
Contact
]()
for
n
in
0
..<
count
{
mocks
.
append
(
.
init
(
photo
:
nil
,
userId
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
email
:
"brad
\(
n
)
@xx.io"
,
phone
:
"819820212
\(
n
)
5BR"
,
status
:
.
verified
,
marshaled
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
username
:
"brad
\(
n
)
"
,
nickname
:
nil
,
createdAt
:
Date
(),
isRecent
:
false
mocks
.
append
(
.
init
(
id
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
username
:
"brad
\(
n
)
"
,
email
:
"brad
\(
n
)
@xx.io"
,
phone
:
"819820212
\(
n
)
5BR"
,
nickname
:
nil
,
photo
:
nil
,
authStatus
:
.
verified
,
isRecent
:
false
,
createdAt
:
Date
()
))
}
...
...
@@ -220,55 +221,55 @@ extension Contact {
}
static
let
angelinaRequested
=
Contact
(
photo
:
nil
,
userId
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
email
:
nil
,
phone
:
nil
,
status
:
.
verificationInProgress
,
id
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
username
:
"angelinajolie"
,
email
:
nil
,
phone
:
nil
,
nickname
:
"Angelica Jolie"
,
createdAt
:
Date
(),
isRecent
:
false
photo
:
nil
,
authStatus
:
.
verificationInProgress
,
isRecent
:
false
,
createdAt
:
Date
()
)
static
let
carlRequested
=
Contact
(
photo
:
nil
,
userId
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
email
:
"carl@jpl.nasa"
,
phone
:
"81982022244BR"
,
status
:
.
verified
,
id
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
username
:
"carlsagan"
,
email
:
"carl@jpl.nasa"
,
phone
:
"81982022244BR"
,
nickname
:
"Carl Sagan"
,
createdAt
:
Date
.
distantPast
,
isRecent
:
false
photo
:
nil
,
authStatus
:
.
verified
,
isRecent
:
false
,
createdAt
:
Date
.
distantPast
)
static
let
elonRequested
=
Contact
(
photo
:
nil
,
userId
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
email
:
"elon@tesla.com"
,
phone
:
nil
,
status
:
.
verified
,
id
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
username
:
"elonmusk"
,
email
:
"elon@tesla.com"
,
phone
:
nil
,
nickname
:
"Elon Musk"
,
createdAt
:
Date
.
distantPast
,
isRecent
:
false
photo
:
nil
,
authStatus
:
.
verified
,
isRecent
:
false
,
createdAt
:
Date
.
distantPast
)
static
let
georgeDiscovered
=
Contact
(
photo
:
nil
,
userId
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
email
:
"george@xx.io"
,
phone
:
"81987022255BR"
,
status
:
.
stranger
,
id
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
username
:
"bruno_muniz74"
,
email
:
"george@xx.io"
,
phone
:
"81987022255BR"
,
nickname
:
"Bruno Muniz"
,
createdAt
:
Date
(),
isRecent
:
false
photo
:
nil
,
authStatus
:
.
stranger
,
isRecent
:
false
,
createdAt
:
Date
()
)
}
...
...
This diff is collapsed.
Click to expand it.
Sources/Integration/Mocks/UserDiscoveryMock.swift
+
12
−
11
View file @
09426404
...
...
@@ -27,17 +27,18 @@ final class UserDiscoveryMock: UserDiscoveryInterface {
_
completion
:
@escaping
(
Result
<
Contact
,
Error
>
)
->
Void
)
{
DispatchQueue
.
global
()
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
completion
(
.
success
(
.
init
(
photo
:
nil
,
userId
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
email
:
nil
,
phone
:
nil
,
status
:
.
stranger
,
marshaled
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
username
:
"mock_username"
,
nickname
:
"mock_nickname"
,
createdAt
:
Date
(),
isRecent
:
false
completion
(
.
success
(
.
init
(
id
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
username
:
"mock_username"
,
email
:
nil
,
phone
:
nil
,
nickname
:
"mock_nickname"
,
photo
:
nil
,
authStatus
:
.
stranger
,
isRecent
:
false
,
createdAt
:
Date
()
)))
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment