@@ -148,4 +148,45 @@ final class OrnamentManagerTests: XCTestCase {
148148 func testAttributionButton( ) {
149149 XCTAssertIdentical ( ornamentsManager. attributionButton, attributionButton)
150150 }
151+
152+ func testTintColor( ) {
153+ options. attributionButton. tintColor = . red
154+ ornamentsManager. options = options
155+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, . red)
156+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, . red)
157+ }
158+
159+ func testTintColorOverride( ) {
160+ ornamentsManager. attributionButton. tintColor = . gray
161+
162+ options. attributionButton. tintColor = . red
163+ ornamentsManager. options = options
164+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, . red)
165+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, . red)
166+ }
167+
168+ func testTintColorSync( ) {
169+ ornamentsManager. attributionButton. tintColor = . gray
170+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, . gray)
171+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, . gray)
172+
173+ options. attributionButton. tintColor = . red
174+ ornamentsManager. options = options
175+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, . red)
176+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, . red)
177+ }
178+
179+ func testTintColorClear( ) {
180+ let originalTintColor = ornamentsManager. attributionButton. tintColor
181+
182+ options. attributionButton. tintColor = . red
183+ ornamentsManager. options = options
184+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, . red)
185+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, . red)
186+
187+ options. attributionButton. tintColor = nil
188+ ornamentsManager. options = options
189+ XCTAssertEqual ( ornamentsManager. attributionButton. tintColor, originalTintColor)
190+ XCTAssertEqual ( ornamentsManager. options. attributionButton. tintColor, originalTintColor)
191+ }
151192}
0 commit comments