Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-notifications
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-notifications
Commits
8cf658f8
Commit
8cf658f8
authored
Oct 02, 2019
by
yogevbd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix iOS unit tests
parent
f12b10e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lib/ios/RNNotificationsTests/RNNotificationEventHandlerTests.m
...os/RNNotificationsTests/RNNotificationEventHandlerTests.m
+6
-4
No files found.
lib/ios/RNNotificationsTests/RNNotificationEventHandlerTests.m
View file @
8cf658f8
...
@@ -70,12 +70,14 @@
...
@@ -70,12 +70,14 @@
-
(
void
)
testDidReceiveNotificationResponse_ShouldEmitEvent
{
-
(
void
)
testDidReceiveNotificationResponse_ShouldEmitEvent
{
UNNotification
*
notification
=
[
self
createNotificationWithIdentifier
:
@"id"
andUserInfo
:@{
@"extraKey"
:
@"extraValue"
}];
UNNotification
*
notification
=
[
self
createNotificationWithIdentifier
:
@"id"
andUserInfo
:@{
@"extraKey"
:
@"extraValue"
}];
UNNotificationResponse
*
response
=
[
self
createNotificationResponseWithIdentifier
:
@"
i
d"
andNotification
:
notification
];
UNNotificationResponse
*
response
=
[
self
createNotificationResponseWithIdentifier
:
@"
actionI
d"
andNotification
:
notification
];
void
(
^
testBlock
)(
void
)
=
^
void
()
{};
void
(
^
testBlock
)(
void
)
=
^
void
()
{};
[[
_mockedNotificationCenter
expect
]
postNotificationName
:
RNNotificationOpened
object
:[
OCMArg
any
]
userInfo
:
[
OCMArg
checkWithBlock
:
^
BOOL
(
id
obj
)
{
[[
_mockedNotificationCenter
expect
]
postNotificationName
:
RNNotificationOpened
object
:[
OCMArg
any
]
userInfo
:
[
OCMArg
checkWithBlock
:
^
BOOL
(
id
response
)
{
return
([[
obj
valueForKey
:
@"identifier"
]
isEqualToString
:
@"id"
]
&&
NSDictionary
*
notification
=
response
[
@"notification"
];
[[
obj
valueForKey
:
@"extraKey"
]
isEqualToString
:
@"extraValue"
]);
NSDictionary
*
action
=
response
[
@"action"
];
return
([[
notification
valueForKey
:
@"identifier"
]
isEqualToString
:
@"id"
]
&&
[[
notification
valueForKey
:
@"extraKey"
]
isEqualToString
:
@"extraValue"
]
&&
[
action
[
@"identifier"
]
isEqualToString
:
@"actionId"
]);
}]];
}]];
[
_uut
didReceiveNotificationResponse
:
response
completionHandler
:
testBlock
];
[
_uut
didReceiveNotificationResponse
:
response
completionHandler
:
testBlock
];
[
_mockedNotificationCenter
verify
];
[
_mockedNotificationCenter
verify
];
...
...
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