Skip to content

Commit

Permalink
Merge pull request #46 from RomanPodymov/feature/tests
Browse files Browse the repository at this point in the history
Tests
  • Loading branch information
ivanvorobei authored Jul 1, 2023
2 parents 1da133b + d067e3c commit cdefb28
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ let package = Package(
swiftSettings: [
.define("ALERTKIT_SPM")
]
),
.testTarget(
name: "AlertKitTests",
dependencies: ["AlertKit"],
path: "Tests"
)
],
swiftLanguageVersions: [.v5]
Expand Down
18 changes: 18 additions & 0 deletions Tests/AlertAppleMusic16ViewTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import XCTest
@testable import AlertKit

class AlertAppleMusic16ViewTests: XCTestCase {

func testCompletion() {
let expectation = expectation(description: "")

let view = UIView(frame: .init())
let alert = AlertAppleMusic16View(title: "title", subtitle: "subtitle", icon: .done)
alert.present(on: view) {
expectation.fulfill()
}
alert.dismiss()

waitForExpectations(timeout: 10, handler: nil)
}
}
18 changes: 18 additions & 0 deletions Tests/AlertAppleMusic17ViewTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import XCTest
@testable import AlertKit

class AlertAppleMusic17ViewTests: XCTestCase {

func testCompletion() {
let expectation = expectation(description: "")

let view = UIView(frame: .init())
let alert = AlertAppleMusic17View(title: "title", subtitle: "subtitle", icon: .done)
alert.present(on: view) {
expectation.fulfill()
}
alert.dismiss()

waitForExpectations(timeout: 10, handler: nil)
}
}

0 comments on commit cdefb28

Please sign in to comment.