Skip to content

Commit fdc352f

Browse files
authored
[Core] Remove testing usage of Options.deepLinkURLScheme (#15004)
1 parent ad5c144 commit fdc352f

File tree

6 files changed

+0
-65
lines changed

6 files changed

+0
-65
lines changed

FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ final class CoreAPITests {
129129
// ...
130130
}
131131

132-
if let _ /* deepLinkURLScheme */ = options.deepLinkURLScheme {
133-
// ...
134-
}
135-
136132
if let _ /* storageBucket */ = options.storageBucket {
137133
// ...
138134
}

FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ class FirebaseAppTests: XCTestCase {
144144
func testConfigureMultipleApps() throws {
145145
let options1 = FirebaseOptions(googleAppID: Constants.Options.googleAppID,
146146
gcmSenderID: Constants.Options.gcmSenderID)
147-
options1.deepLinkURLScheme = Constants.Options.deepLinkURLScheme
148147

149148
expectAppConfigurationNotification(appName: Constants.testAppName1, isDefaultApp: false)
150149

@@ -154,7 +153,6 @@ class FirebaseAppTests: XCTestCase {
154153
XCTAssertEqual(app1.name, Constants.testAppName1)
155154
XCTAssertEqual(app1.options.googleAppID, Constants.Options.googleAppID)
156155
XCTAssertEqual(app1.options.gcmSenderID, Constants.Options.gcmSenderID)
157-
XCTAssertEqual(app1.options.deepLinkURLScheme, Constants.Options.deepLinkURLScheme)
158156
XCTAssertTrue(FirebaseApp.allApps?.count == 1)
159157

160158
// Configure a different app with valid customized options.
@@ -288,8 +286,6 @@ class FirebaseAppTests: XCTestCase {
288286

289287
let options = FirebaseOptions(googleAppID: Constants.Options.googleAppID,
290288
gcmSenderID: Constants.Options.gcmSenderID)
291-
let superSecretURLScheme = "com.supersecret.googledeeplinkurl"
292-
options.deepLinkURLScheme = superSecretURLScheme
293289
FirebaseApp.configure(name: Constants.testAppName1, options: options)
294290

295291
let app = try XCTUnwrap(
@@ -299,7 +295,6 @@ class FirebaseAppTests: XCTestCase {
299295
XCTAssertEqual(app.name, Constants.testAppName1)
300296
XCTAssertEqual(app.options.googleAppID, Constants.Options.googleAppID)
301297
XCTAssertEqual(app.options.gcmSenderID, Constants.Options.gcmSenderID)
302-
XCTAssertEqual(app.options.deepLinkURLScheme, superSecretURLScheme)
303298
}
304299

305300
func testFirebaseDataCollectionDefaultEnabled() throws {

FirebaseCore/Tests/SwiftUnit/FirebaseOptionsTests.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ class FirebaseOptionsTests: XCTestCase {
9191
options.googleAppID = newGoogleAppID
9292
XCTAssertEqual(options.googleAppID, newGoogleAppID)
9393

94-
XCTAssertNil(options.deepLinkURLScheme)
95-
options.deepLinkURLScheme = Constants.Options.deepLinkURLScheme
96-
XCTAssertEqual(options.deepLinkURLScheme, Constants.Options.deepLinkURLScheme)
97-
9894
XCTAssertNil(options.appGroupID)
9995
options.appGroupID = Constants.Options.appGroupID
10096
XCTAssertEqual(options.appGroupID, Constants.Options.appGroupID)
@@ -110,12 +106,6 @@ class FirebaseOptionsTests: XCTestCase {
110106
XCTAssertEqual(options.apiKey, apiKey)
111107
apiKey = "000000000"
112108
XCTAssertNotEqual(options.apiKey, apiKey)
113-
114-
var deepLinkURLScheme = "comdeeplinkurl"
115-
options.deepLinkURLScheme = deepLinkURLScheme
116-
XCTAssertEqual(options.deepLinkURLScheme, deepLinkURLScheme)
117-
deepLinkURLScheme = "comlinkurl"
118-
XCTAssertNotEqual(options.deepLinkURLScheme, deepLinkURLScheme)
119109
}
120110

121111
func testOptionsEquality() throws {
@@ -146,7 +136,6 @@ class FirebaseOptionsTests: XCTestCase {
146136
XCTAssertEqual(options.projectID, Constants.Options.projectID)
147137
XCTAssertEqual(options.googleAppID, Constants.Options.googleAppID)
148138
XCTAssertEqual(options.databaseURL, Constants.Options.databaseURL)
149-
XCTAssertNil(options.deepLinkURLScheme)
150139
XCTAssertEqual(options.storageBucket, Constants.Options.storageBucket)
151140
XCTAssertNil(options.appGroupID)
152141
}
@@ -156,7 +145,6 @@ class FirebaseOptionsTests: XCTestCase {
156145
XCTAssertNil(options.clientID)
157146
XCTAssertNil(options.projectID)
158147
XCTAssertNil(options.databaseURL)
159-
XCTAssertNil(options.deepLinkURLScheme)
160148
XCTAssertNil(options.storageBucket)
161149
XCTAssertNil(options.appGroupID)
162150
}

FirebaseCore/Tests/SwiftUnit/SwiftTestingUtilities/Constants.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public enum Constants {
2828
static let projectID = "abc-xyz-123"
2929
static let googleAppID = "1:123:ios:123abc"
3030
static let databaseURL = "https://abc-xyz-123.firebaseio.com"
31-
static let deepLinkURLScheme = "comgoogledeeplinkurl"
3231
static let storageBucket = "project-id-123.storage.firebase.com"
3332
static let appGroupID: String? = nil
3433
}

FirebaseCore/Tests/Unit/FIRAppTest.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ - (void)testConfigureWithNameAndOptions {
222222
- (void)testConfigureWithMultipleApps {
223223
FIROptions *options1 = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID
224224
GCMSenderID:kGCMSenderID];
225-
options1.deepLinkURLScheme = kDeepLinkURLScheme;
226-
227225
NSDictionary *expectedUserInfo1 = [self expectedUserInfoWithAppName:kFIRTestAppName1
228226
isDefaultApp:NO];
229227
XCTestExpectation *configExpectation1 =

FirebaseCore/Tests/Unit/FIROptionsTest.m

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ - (void)testInit {
4848
NSDictionary *optionsDictionary = [FIROptions defaultOptionsDictionary];
4949
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
5050
[self assertOptionsMatchDefaults:options andProjectID:YES];
51-
XCTAssertNil(options.deepLinkURLScheme);
5251
XCTAssertTrue(options.usingOptionsFromDefaultPlist);
53-
54-
options.deepLinkURLScheme = kDeepLinkURLScheme;
55-
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
5652
}
5753

5854
- (void)testDefaultOptionsDictionaryWithNilFilePath {
@@ -77,11 +73,7 @@ - (void)testDefaultOptions {
7773
[FIROptionsMock mockFIROptions];
7874
FIROptions *options = [FIROptions defaultOptions];
7975
[self assertOptionsMatchDefaults:options andProjectID:YES];
80-
XCTAssertNil(options.deepLinkURLScheme);
8176
XCTAssertTrue(options.usingOptionsFromDefaultPlist);
82-
83-
options.deepLinkURLScheme = kDeepLinkURLScheme;
84-
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
8577
}
8678

8779
#ifndef SWIFT_PACKAGE
@@ -124,7 +116,6 @@ - (void)testInitWithContentsOfFile {
124116
NSString *filePath = [self validGoogleServicesInfoPlistPath];
125117
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
126118
[self assertOptionsMatchDefaults:options andProjectID:YES];
127-
XCTAssertNil(options.deepLinkURLScheme);
128119
XCTAssertFalse(options.usingOptionsFromDefaultPlist);
129120

130121
#pragma clang diagnostic push
@@ -145,11 +136,9 @@ - (void)testInitCustomizedOptions {
145136
options.bundleID = kBundleID;
146137
options.clientID = kClientID;
147138
options.databaseURL = kDatabaseURL;
148-
options.deepLinkURLScheme = kDeepLinkURLScheme;
149139
options.projectID = kProjectID;
150140
options.storageBucket = kStorageBucket;
151141
[self assertOptionsMatchDefaults:options andProjectID:YES];
152-
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
153142
XCTAssertFalse(options.usingOptionsFromDefaultPlist);
154143
}
155144

@@ -209,11 +198,6 @@ - (void)testCopyingProperties {
209198
[mutableString appendString:@"2"];
210199
XCTAssertEqualObjects(options.databaseURL, @"1");
211200

212-
mutableString = [[NSMutableString alloc] initWithString:@"1"];
213-
options.deepLinkURLScheme = mutableString;
214-
[mutableString appendString:@"2"];
215-
XCTAssertEqualObjects(options.deepLinkURLScheme, @"1");
216-
217201
mutableString = [[NSMutableString alloc] initWithString:@"1"];
218202
options.storageBucket = mutableString;
219203
[mutableString appendString:@"2"];
@@ -225,30 +209,6 @@ - (void)testCopyingProperties {
225209
XCTAssertEqualObjects(options.appGroupID, @"1");
226210
}
227211

228-
- (void)testCopyWithZone {
229-
[FIROptionsMock mockFIROptions];
230-
// default options
231-
FIROptions *options = [FIROptions defaultOptions];
232-
options.deepLinkURLScheme = kDeepLinkURLScheme;
233-
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
234-
235-
FIROptions *newOptions = [options copy];
236-
XCTAssertEqualObjects(newOptions.deepLinkURLScheme, kDeepLinkURLScheme);
237-
238-
[options setDeepLinkURLScheme:kNewDeepLinkURLScheme];
239-
XCTAssertEqualObjects(options.deepLinkURLScheme, kNewDeepLinkURLScheme);
240-
XCTAssertEqualObjects(newOptions.deepLinkURLScheme, kDeepLinkURLScheme);
241-
242-
// customized options
243-
FIROptions *customizedOptions = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID
244-
GCMSenderID:kGCMSenderID];
245-
customizedOptions.deepLinkURLScheme = kDeepLinkURLScheme;
246-
FIROptions *copyCustomizedOptions = [customizedOptions copy];
247-
[copyCustomizedOptions setDeepLinkURLScheme:kNewDeepLinkURLScheme];
248-
XCTAssertEqualObjects(customizedOptions.deepLinkURLScheme, kDeepLinkURLScheme);
249-
XCTAssertEqualObjects(copyCustomizedOptions.deepLinkURLScheme, kNewDeepLinkURLScheme);
250-
}
251-
252212
- (void)testAnalyticsConstants {
253213
// The keys are public values and should never change.
254214
XCTAssertEqualObjects(kFIRIsMeasurementEnabled, @"IS_MEASUREMENT_ENABLED");
@@ -588,7 +548,6 @@ - (void)testModifyingOptionsThrows {
588548
XCTAssertThrows(options.bundleID = @"should_throw");
589549
XCTAssertThrows(options.clientID = @"should_throw");
590550
XCTAssertThrows(options.databaseURL = @"should_throw");
591-
XCTAssertThrows(options.deepLinkURLScheme = @"should_throw");
592551
XCTAssertThrows(options.GCMSenderID = @"should_throw");
593552
XCTAssertThrows(options.googleAppID = @"should_throw");
594553
XCTAssertThrows(options.projectID = @"should_throw");

0 commit comments

Comments
 (0)