Skip to content

Commit

Permalink
Test ad manager (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgia authored Sep 30, 2019
1 parent f02d293 commit e7fc667
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/PingbacksClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
}

0 comments on commit e7fc667

Please sign in to comment.