2018-03-20 11:59:03 -07:00
|
|
|
// Copyright 2017 Google
|
|
|
|
|
//
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
//
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
//
|
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
2018-03-29 09:44:48 -06:00
|
|
|
#import <XCTest/XCTest.h>
|
2018-03-20 11:59:03 -07:00
|
|
|
|
2020-06-19 12:14:22 -07:00
|
|
|
#import "Functions/FirebaseFunctions/FIRFunctions+Internal.h"
|
2020-08-03 16:28:14 -07:00
|
|
|
#import "Functions/FirebaseFunctions/Public/FirebaseFunctions/FIRFunctions.h"
|
2018-03-20 11:59:03 -07:00
|
|
|
|
|
|
|
|
@interface FIRFunctionsTests : XCTestCase
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
@implementation FIRFunctionsTests
|
|
|
|
|
|
|
|
|
|
- (void)setUp {
|
|
|
|
|
[super setUp];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)tearDown {
|
|
|
|
|
[super tearDown];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)testURLWithName {
|
2019-01-02 09:27:31 -08:00
|
|
|
FIRFunctions *functions = [[FIRFunctions alloc] initWithProjectID:@"my-project"
|
|
|
|
|
region:@"my-region"
|
2020-09-03 14:45:56 -04:00
|
|
|
auth:nil
|
|
|
|
|
messaging:nil];
|
2018-03-20 11:59:03 -07:00
|
|
|
NSString *url = [functions URLWithName:@"my-endpoint"];
|
|
|
|
|
XCTAssertEqualObjects(@"https://my-region-my-project.cloudfunctions.net/my-endpoint", url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|