Skip to content

Commit

Permalink
fix typo in iOS target (#2673)
Browse files Browse the repository at this point in the history
* also a few minor cleanup
  • Loading branch information
charlotteliang authored and paulb777 committed Mar 28, 2019
1 parent 04561fe commit e024df5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
15 changes: 0 additions & 15 deletions Example/Messaging/Tests/FIRMessagingDataMessageManagerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ - (void)testSendValidMessage_withNoConnection {
error:[OCMArg anyObjectRef]];

// should be logged into the service
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
// try to send messages with no connection should be queued into RMQ
NSMutableDictionary *message = [self upstreamMessageWithID:messageID ttl:-1 delay:0];
Expand Down Expand Up @@ -158,7 +157,6 @@ - (void)testSendInvalidMessage_withNoTo {
}]]);

// should be logged into the service
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self.dataMessageManager sendDataMessageStanza:message];

Expand Down Expand Up @@ -187,7 +185,6 @@ - (void)testSendInvalidMessage_withSizeExceeded {
return NO;
}]]);

[self addFakeFIRMessagingRegistrationToken];
// should be logged into the service
[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self.dataMessageManager sendDataMessageStanza:message];
Expand Down Expand Up @@ -215,7 +212,6 @@ - (void)testSendValidMessage_withRmqSaveError {

// should be logged into the service
[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager sendDataMessageStanza:message];

OCMVerifyAll(self.mockReceiver);
Expand All @@ -240,7 +236,6 @@ - (void)testSendValidMessage_withTTL0 {
OCMExpect([self.mockClient sendMessage:[OCMArg checkWithBlock:isValidStanza]]);

[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager sendDataMessageStanza:message];

OCMVerifyAll(self.mockClient);
Expand Down Expand Up @@ -276,7 +271,6 @@ - (void)XXX_testSendValidMessage_withTTL0AndNoFIRMessagingConnection {
OCMExpect([self.mockClient retryConnectionImmediately:[OCMArg isEqual:@YES]]);

[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager sendDataMessageStanza:message];

OCMVerifyAll(self.mockClient);
Expand All @@ -302,7 +296,6 @@ - (void)xxx_testSendValidMessage_withTTL0AndNoNetwork {
}]]);

[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager sendDataMessageStanza:message];

OCMVerifyAll(self.mockReceiver);
Expand All @@ -329,7 +322,6 @@ - (void)XXX_testDelayedMessagesBeingResentOnReconnect {
error:[OCMArg isNil]]);

[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];
[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager sendDataMessageStanza:message];

__block FIRMessagingDataMessageHandler dataMessageHandler;
Expand Down Expand Up @@ -496,7 +488,6 @@ - (void)testResendSavedMessages {
// have a real RMQ store
[self.dataMessageManager setRmq2Manager:newRmqManager];

[self addFakeFIRMessagingRegistrationToken];
[self.dataMessageManager setDeviceAuthID:@"auth-id" secretToken:@"secret-token"];

// send a couple of message with no connection should be saved to RMQ
Expand Down Expand Up @@ -576,12 +567,6 @@ - (void)testResendingExpiredMessagesFails {
dataMessageHandler:nil];
}

#pragma mark - Private

- (void)addFakeFIRMessagingRegistrationToken {
// [[FIRMessagingDefaultsManager sharedInstance] saveAppIDToken:kFIRMessagingAppIDToken];
}

#pragma mark - Create Packet

- (GtalkDataMessageStanza *)validDataMessagePacket {
Expand Down
2 changes: 1 addition & 1 deletion Firebase/Messaging/FIRMessagingCheckinService.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* Register the device with Checkin Service and get back the `authID`, `secret token` etc. for the
* client. Checkin results are cached in the `FIRMessagingDefaultsManager` and periodically refreshed to
* client. Checkin results are cached and periodically refreshed to
* prevent them from being stale. Each client needs to register with checkin before registering
* with FIRMessaging.
*/
Expand Down
2 changes: 1 addition & 1 deletion Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (instancetype)initWithDatabaseName:(NSString *)databaseName {
self = [super init];
if (self) {
_databaseName = [databaseName copy];
#if TARGET_OS_iOS
#if TARGET_OS_IOS
BOOL didMoveToApplicationSupport =
[self moveToApplicationSupportSubDirectory:kFIRMessagingSubDirectoryName];

Expand Down

0 comments on commit e024df5

Please sign in to comment.