diff --git a/Tests/PingbacksClientTests.swift b/Tests/PingbacksClientTests.swift index ad6b17bc..a4fa127e 100644 --- a/Tests/PingbacksClientTests.swift +++ b/Tests/PingbacksClientTests.swift @@ -132,5 +132,17 @@ class PingbacksClientTests : XCTestCase { } } + func testAdsManager() { + + let macros = ["%%ADVERTISING_IDENTIFIER_PLAIN%%", "%%CACHEBUSTER%%", "%%UOO%%", "%%PLATFORM%%", "%%DEVICE_GROUP%%", "%%OS_GROUP%%", "%%START_OF_SESSION%%", "%%V%%", "%%SDKV%%"] + for macro in macros { + let urltest = "http://fake.com/?m=\(macro)" + let result = AdManager.urlRequestFromTag(urltest) + XCTAssertNotNil(result) + let hasValue = result?.url?.absoluteString != urltest + XCTAssertTrue(hasValue) + } + + } }