AuthProviderIDTests.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2023 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. import FirebaseAuth
  15. import Foundation
  16. import XCTest
  17. @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
  18. final class AuthProviderIDTests: XCTestCase {
  19. // Verify that AuthProviderID enum values match the class values published for Objective-C
  20. // compatibility.
  21. func testAuthProviderIDEnumRawValue() {
  22. XCTAssertEqual(AuthProviderID.apple.rawValue, "apple.com")
  23. XCTAssertEqual(AuthProviderID.email.rawValue, EmailAuthProvider.id)
  24. XCTAssertEqual(AuthProviderID.facebook.rawValue, FacebookAuthProvider.id)
  25. #if !os(watchOS)
  26. XCTAssertEqual(AuthProviderID.gameCenter.rawValue, GameCenterAuthProvider.id)
  27. #endif
  28. XCTAssertEqual(AuthProviderID.gitHub.rawValue, GitHubAuthProvider.id)
  29. XCTAssertEqual(AuthProviderID.google.rawValue, GoogleAuthProvider.id)
  30. XCTAssertEqual(AuthProviderID.phone.rawValue, PhoneAuthProvider.id)
  31. }
  32. }