FBConfigurationTests.m 957 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <XCTest/XCTest.h>
  10. #import "FBIntegrationTestCase.h"
  11. #import "FBConfiguration.h"
  12. #import "FBRuntimeUtils.h"
  13. @interface FBConfigurationTests : FBIntegrationTestCase
  14. @end
  15. @implementation FBConfigurationTests
  16. - (void)setUp
  17. {
  18. [super setUp];
  19. [self launchApplication];
  20. }
  21. - (void)testReduceMotion
  22. {
  23. BOOL defaultReduceMotionEnabled = [FBConfiguration reduceMotionEnabled];
  24. [FBConfiguration setReduceMotionEnabled:YES];
  25. XCTAssertTrue([FBConfiguration reduceMotionEnabled]);
  26. [FBConfiguration setReduceMotionEnabled:defaultReduceMotionEnabled];
  27. XCTAssertEqual([FBConfiguration reduceMotionEnabled], defaultReduceMotionEnabled);
  28. }
  29. @end