Skip to content

Commit cdefb28

Browse files
authored
Merge pull request #46 from RomanPodymov/feature/tests
Tests
2 parents 1da133b + d067e3c commit cdefb28

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

Package.swift

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ let package = Package(
2020
swiftSettings: [
2121
.define("ALERTKIT_SPM")
2222
]
23+
),
24+
.testTarget(
25+
name: "AlertKitTests",
26+
dependencies: ["AlertKit"],
27+
path: "Tests"
2328
)
2429
],
2530
swiftLanguageVersions: [.v5]
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import XCTest
2+
@testable import AlertKit
3+
4+
class AlertAppleMusic16ViewTests: XCTestCase {
5+
6+
func testCompletion() {
7+
let expectation = expectation(description: "")
8+
9+
let view = UIView(frame: .init())
10+
let alert = AlertAppleMusic16View(title: "title", subtitle: "subtitle", icon: .done)
11+
alert.present(on: view) {
12+
expectation.fulfill()
13+
}
14+
alert.dismiss()
15+
16+
waitForExpectations(timeout: 10, handler: nil)
17+
}
18+
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import XCTest
2+
@testable import AlertKit
3+
4+
class AlertAppleMusic17ViewTests: XCTestCase {
5+
6+
func testCompletion() {
7+
let expectation = expectation(description: "")
8+
9+
let view = UIView(frame: .init())
10+
let alert = AlertAppleMusic17View(title: "title", subtitle: "subtitle", icon: .done)
11+
alert.present(on: view) {
12+
expectation.fulfill()
13+
}
14+
alert.dismiss()
15+
16+
waitForExpectations(timeout: 10, handler: nil)
17+
}
18+
}

0 commit comments

Comments
 (0)