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
Branches containing commit
No related tags found
Tags containing commit
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 {
...
@@ -188,12 +188,12 @@ public final class BindingsMock: BindingsInterface {
extension
Group
{
extension
Group
{
static
let
mockGroup
=
Group
(
static
let
mockGroup
=
Group
(
leader
:
"mockGroup
Leader
"
.
data
(
using
:
.
utf8
)
!
,
id
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
,
name
:
"Bruno's birthday 6/1"
,
name
:
"Bruno's birthday 6/1"
,
groupId
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
,
leaderId
:
"mockGroupLeader"
.
data
(
using
:
.
utf8
)
!
,
status
:
.
pending
,
createdAt
:
Date
.
distantPast
,
createdAt
:
Date
.
distantPast
,
serialize
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
authStatus
:
.
pending
,
serialized
:
"mockGroup"
.
data
(
using
:
.
utf8
)
!
)
)
}
}
...
@@ -202,17 +202,18 @@ extension Contact {
...
@@ -202,17 +202,18 @@ extension Contact {
var
mocks
=
[
Contact
]()
var
mocks
=
[
Contact
]()
for
n
in
0
..<
count
{
for
n
in
0
..<
count
{
mocks
.
append
(
.
init
(
mocks
.
append
(
photo
:
nil
,
.
init
(
userId
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
id
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
email
:
"brad
\(
n
)
@xx.io"
,
marshaled
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
phone
:
"819820212
\(
n
)
5BR"
,
username
:
"brad
\(
n
)
"
,
status
:
.
verified
,
email
:
"brad
\(
n
)
@xx.io"
,
marshaled
:
"brad
\(
n
)
"
.
data
(
using
:
.
utf8
)
!
,
phone
:
"819820212
\(
n
)
5BR"
,
username
:
"brad
\(
n
)
"
,
nickname
:
nil
,
nickname
:
nil
,
photo
:
nil
,
createdAt
:
Date
(),
authStatus
:
.
verified
,
isRecent
:
false
isRecent
:
false
,
createdAt
:
Date
()
))
))
}
}
...
@@ -220,55 +221,55 @@ extension Contact {
...
@@ -220,55 +221,55 @@ extension Contact {
}
}
static
let
angelinaRequested
=
Contact
(
static
let
angelinaRequested
=
Contact
(
photo
:
nil
,
id
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
userId
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
email
:
nil
,
phone
:
nil
,
status
:
.
verificationInProgress
,
marshaled
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"angelinajolie"
.
data
(
using
:
.
utf8
)
!
,
username
:
"angelinajolie"
,
username
:
"angelinajolie"
,
email
:
nil
,
phone
:
nil
,
nickname
:
"Angelica Jolie"
,
nickname
:
"Angelica Jolie"
,
createdAt
:
Date
(),
photo
:
nil
,
isRecent
:
false
authStatus
:
.
verificationInProgress
,
isRecent
:
false
,
createdAt
:
Date
()
)
)
static
let
carlRequested
=
Contact
(
static
let
carlRequested
=
Contact
(
photo
:
nil
,
id
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
userId
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
email
:
"carl@jpl.nasa"
,
phone
:
"81982022244BR"
,
status
:
.
verified
,
marshaled
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"carlsagan"
.
data
(
using
:
.
utf8
)
!
,
username
:
"carlsagan"
,
username
:
"carlsagan"
,
email
:
"carl@jpl.nasa"
,
phone
:
"81982022244BR"
,
nickname
:
"Carl Sagan"
,
nickname
:
"Carl Sagan"
,
createdAt
:
Date
.
distantPast
,
photo
:
nil
,
isRecent
:
false
authStatus
:
.
verified
,
isRecent
:
false
,
createdAt
:
Date
.
distantPast
)
)
static
let
elonRequested
=
Contact
(
static
let
elonRequested
=
Contact
(
photo
:
nil
,
id
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
userId
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
email
:
"elon@tesla.com"
,
phone
:
nil
,
status
:
.
verified
,
marshaled
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"elonmusk"
.
data
(
using
:
.
utf8
)
!
,
username
:
"elonmusk"
,
username
:
"elonmusk"
,
email
:
"elon@tesla.com"
,
phone
:
nil
,
nickname
:
"Elon Musk"
,
nickname
:
"Elon Musk"
,
createdAt
:
Date
.
distantPast
,
photo
:
nil
,
isRecent
:
false
authStatus
:
.
verified
,
isRecent
:
false
,
createdAt
:
Date
.
distantPast
)
)
static
let
georgeDiscovered
=
Contact
(
static
let
georgeDiscovered
=
Contact
(
photo
:
nil
,
id
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
userId
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
email
:
"george@xx.io"
,
phone
:
"81987022255BR"
,
status
:
.
stranger
,
marshaled
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
marshaled
:
"georgebenson74"
.
data
(
using
:
.
utf8
)
!
,
username
:
"bruno_muniz74"
,
username
:
"bruno_muniz74"
,
email
:
"george@xx.io"
,
phone
:
"81987022255BR"
,
nickname
:
"Bruno Muniz"
,
nickname
:
"Bruno Muniz"
,
createdAt
:
Date
(),
photo
:
nil
,
isRecent
:
false
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 {
...
@@ -27,17 +27,18 @@ final class UserDiscoveryMock: UserDiscoveryInterface {
_
completion
:
@escaping
(
Result
<
Contact
,
Error
>
)
->
Void
_
completion
:
@escaping
(
Result
<
Contact
,
Error
>
)
->
Void
)
{
)
{
DispatchQueue
.
global
()
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
global
()
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
completion
(
.
success
(
.
init
(
completion
(
.
success
(
photo
:
nil
,
.
init
(
userId
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
id
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
email
:
nil
,
marshaled
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
phone
:
nil
,
username
:
"mock_username"
,
status
:
.
stranger
,
email
:
nil
,
marshaled
:
"mock_username"
.
data
(
using
:
.
utf8
)
!
,
phone
:
nil
,
username
:
"mock_username"
,
nickname
:
"mock_nickname"
,
nickname
:
"mock_nickname"
,
photo
:
nil
,
createdAt
:
Date
(),
authStatus
:
.
stranger
,
isRecent
:
false
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