Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ final class CoreAPITests {
// ...
}

if let _ /* deepLinkURLScheme */ = options.deepLinkURLScheme {
// ...
}

if let _ /* storageBucket */ = options.storageBucket {
// ...
}
Expand Down
5 changes: 0 additions & 5 deletions FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class FirebaseAppTests: XCTestCase {
func testConfigureMultipleApps() throws {
let options1 = FirebaseOptions(googleAppID: Constants.Options.googleAppID,
gcmSenderID: Constants.Options.gcmSenderID)
options1.deepLinkURLScheme = Constants.Options.deepLinkURLScheme

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

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

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

let options = FirebaseOptions(googleAppID: Constants.Options.googleAppID,
gcmSenderID: Constants.Options.gcmSenderID)
let superSecretURLScheme = "com.supersecret.googledeeplinkurl"
options.deepLinkURLScheme = superSecretURLScheme
FirebaseApp.configure(name: Constants.testAppName1, options: options)

let app = try XCTUnwrap(
Expand All @@ -299,7 +295,6 @@ class FirebaseAppTests: XCTestCase {
XCTAssertEqual(app.name, Constants.testAppName1)
XCTAssertEqual(app.options.googleAppID, Constants.Options.googleAppID)
XCTAssertEqual(app.options.gcmSenderID, Constants.Options.gcmSenderID)
XCTAssertEqual(app.options.deepLinkURLScheme, superSecretURLScheme)
}

func testFirebaseDataCollectionDefaultEnabled() throws {
Expand Down
12 changes: 0 additions & 12 deletions FirebaseCore/Tests/SwiftUnit/FirebaseOptionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ class FirebaseOptionsTests: XCTestCase {
options.googleAppID = newGoogleAppID
XCTAssertEqual(options.googleAppID, newGoogleAppID)

XCTAssertNil(options.deepLinkURLScheme)
options.deepLinkURLScheme = Constants.Options.deepLinkURLScheme
XCTAssertEqual(options.deepLinkURLScheme, Constants.Options.deepLinkURLScheme)

XCTAssertNil(options.appGroupID)
options.appGroupID = Constants.Options.appGroupID
XCTAssertEqual(options.appGroupID, Constants.Options.appGroupID)
Expand All @@ -110,12 +106,6 @@ class FirebaseOptionsTests: XCTestCase {
XCTAssertEqual(options.apiKey, apiKey)
apiKey = "000000000"
XCTAssertNotEqual(options.apiKey, apiKey)

var deepLinkURLScheme = "comdeeplinkurl"
options.deepLinkURLScheme = deepLinkURLScheme
XCTAssertEqual(options.deepLinkURLScheme, deepLinkURLScheme)
deepLinkURLScheme = "comlinkurl"
XCTAssertNotEqual(options.deepLinkURLScheme, deepLinkURLScheme)
}

func testOptionsEquality() throws {
Expand Down Expand Up @@ -146,7 +136,6 @@ class FirebaseOptionsTests: XCTestCase {
XCTAssertEqual(options.projectID, Constants.Options.projectID)
XCTAssertEqual(options.googleAppID, Constants.Options.googleAppID)
XCTAssertEqual(options.databaseURL, Constants.Options.databaseURL)
XCTAssertNil(options.deepLinkURLScheme)
XCTAssertEqual(options.storageBucket, Constants.Options.storageBucket)
XCTAssertNil(options.appGroupID)
}
Expand All @@ -156,7 +145,6 @@ class FirebaseOptionsTests: XCTestCase {
XCTAssertNil(options.clientID)
XCTAssertNil(options.projectID)
XCTAssertNil(options.databaseURL)
XCTAssertNil(options.deepLinkURLScheme)
XCTAssertNil(options.storageBucket)
XCTAssertNil(options.appGroupID)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public enum Constants {
static let projectID = "abc-xyz-123"
static let googleAppID = "1:123:ios:123abc"
static let databaseURL = "https://abc-xyz-123.firebaseio.com"
static let deepLinkURLScheme = "comgoogledeeplinkurl"
static let storageBucket = "project-id-123.storage.firebase.com"
static let appGroupID: String? = nil
}
Expand Down
2 changes: 0 additions & 2 deletions FirebaseCore/Tests/Unit/FIRAppTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ - (void)testConfigureWithNameAndOptions {
- (void)testConfigureWithMultipleApps {
FIROptions *options1 = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID
GCMSenderID:kGCMSenderID];
options1.deepLinkURLScheme = kDeepLinkURLScheme;

NSDictionary *expectedUserInfo1 = [self expectedUserInfoWithAppName:kFIRTestAppName1
isDefaultApp:NO];
XCTestExpectation *configExpectation1 =
Expand Down
41 changes: 0 additions & 41 deletions FirebaseCore/Tests/Unit/FIROptionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ - (void)testInit {
NSDictionary *optionsDictionary = [FIROptions defaultOptionsDictionary];
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
[self assertOptionsMatchDefaults:options andProjectID:YES];
XCTAssertNil(options.deepLinkURLScheme);
XCTAssertTrue(options.usingOptionsFromDefaultPlist);

options.deepLinkURLScheme = kDeepLinkURLScheme;
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
}

- (void)testDefaultOptionsDictionaryWithNilFilePath {
Expand All @@ -77,11 +73,7 @@ - (void)testDefaultOptions {
[FIROptionsMock mockFIROptions];
FIROptions *options = [FIROptions defaultOptions];
[self assertOptionsMatchDefaults:options andProjectID:YES];
XCTAssertNil(options.deepLinkURLScheme);
XCTAssertTrue(options.usingOptionsFromDefaultPlist);

options.deepLinkURLScheme = kDeepLinkURLScheme;
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
}

#ifndef SWIFT_PACKAGE
Expand Down Expand Up @@ -124,7 +116,6 @@ - (void)testInitWithContentsOfFile {
NSString *filePath = [self validGoogleServicesInfoPlistPath];
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
[self assertOptionsMatchDefaults:options andProjectID:YES];
XCTAssertNil(options.deepLinkURLScheme);
XCTAssertFalse(options.usingOptionsFromDefaultPlist);

#pragma clang diagnostic push
Expand All @@ -145,11 +136,9 @@ - (void)testInitCustomizedOptions {
options.bundleID = kBundleID;
options.clientID = kClientID;
options.databaseURL = kDatabaseURL;
options.deepLinkURLScheme = kDeepLinkURLScheme;
options.projectID = kProjectID;
options.storageBucket = kStorageBucket;
[self assertOptionsMatchDefaults:options andProjectID:YES];
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);
XCTAssertFalse(options.usingOptionsFromDefaultPlist);
}

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

mutableString = [[NSMutableString alloc] initWithString:@"1"];
options.deepLinkURLScheme = mutableString;
[mutableString appendString:@"2"];
XCTAssertEqualObjects(options.deepLinkURLScheme, @"1");

mutableString = [[NSMutableString alloc] initWithString:@"1"];
options.storageBucket = mutableString;
[mutableString appendString:@"2"];
Expand All @@ -225,30 +209,6 @@ - (void)testCopyingProperties {
XCTAssertEqualObjects(options.appGroupID, @"1");
}

- (void)testCopyWithZone {
[FIROptionsMock mockFIROptions];
// default options
FIROptions *options = [FIROptions defaultOptions];
options.deepLinkURLScheme = kDeepLinkURLScheme;
XCTAssertEqualObjects(options.deepLinkURLScheme, kDeepLinkURLScheme);

FIROptions *newOptions = [options copy];
XCTAssertEqualObjects(newOptions.deepLinkURLScheme, kDeepLinkURLScheme);

[options setDeepLinkURLScheme:kNewDeepLinkURLScheme];
XCTAssertEqualObjects(options.deepLinkURLScheme, kNewDeepLinkURLScheme);
XCTAssertEqualObjects(newOptions.deepLinkURLScheme, kDeepLinkURLScheme);

// customized options
FIROptions *customizedOptions = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID
GCMSenderID:kGCMSenderID];
customizedOptions.deepLinkURLScheme = kDeepLinkURLScheme;
FIROptions *copyCustomizedOptions = [customizedOptions copy];
[copyCustomizedOptions setDeepLinkURLScheme:kNewDeepLinkURLScheme];
XCTAssertEqualObjects(customizedOptions.deepLinkURLScheme, kDeepLinkURLScheme);
XCTAssertEqualObjects(copyCustomizedOptions.deepLinkURLScheme, kNewDeepLinkURLScheme);
}

- (void)testAnalyticsConstants {
// The keys are public values and should never change.
XCTAssertEqualObjects(kFIRIsMeasurementEnabled, @"IS_MEASUREMENT_ENABLED");
Expand Down Expand Up @@ -588,7 +548,6 @@ - (void)testModifyingOptionsThrows {
XCTAssertThrows(options.bundleID = @"should_throw");
XCTAssertThrows(options.clientID = @"should_throw");
XCTAssertThrows(options.databaseURL = @"should_throw");
XCTAssertThrows(options.deepLinkURLScheme = @"should_throw");
XCTAssertThrows(options.GCMSenderID = @"should_throw");
XCTAssertThrows(options.googleAppID = @"should_throw");
XCTAssertThrows(options.projectID = @"should_throw");
Expand Down
Loading