aboutsummaryrefslogtreecommitdiffhomepage
path: root/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m
diff options
context:
space:
mode:
Diffstat (limited to 'Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m')
-rw-r--r--Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m18
1 files changed, 17 insertions, 1 deletions
diff --git a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m
index 8e826c9..2e765f6 100644
--- a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m
+++ b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m
@@ -381,7 +381,7 @@ NSTimeInterval kFIRStorageIntegrationTestTimeout = 30;
/// Only allow 1kB size, which is smaller than our file
[ref dataWithMaxSize:1 * 1024
completion:^(NSData *data, NSError *error) {
- XCTAssertEqual(data, nil);
+ XCTAssertNil(nil);
XCTAssertEqual(error.code, FIRStorageErrorCodeDownloadSizeExceeded);
[expectation fulfill];
}];
@@ -389,6 +389,22 @@ NSTimeInterval kFIRStorageIntegrationTestTimeout = 30;
[self waitForExpectations];
}
+- (void)testUnauthenticatedSimpleGetDownloadURL {
+ XCTestExpectation *expectation =
+ [self expectationWithDescription:@"testUnauthenticatedSimpleGetDownloadURL"];
+
+ FIRStorageReference *ref = [self.storage referenceWithPath:@"ios/public/1mb"];
+
+ [ref downloadURLWithCompletion:^(NSURL *downloadURL, NSError *error) {
+ XCTAssertNil(error);
+ XCTAssertTrue(
+ [[downloadURL absoluteString] hasPrefix:@"https://firebasestorage.googleapis.com/"]);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectations];
+}
+
- (void)testUnauthenticatedSimpleGetFile {
XCTestExpectation *expectation =
[self expectationWithDescription:@"testUnauthenticatedSimpleGetData"];