forked from applidium/OverlayContainer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOverlayInsertionTest.swift
35 lines (30 loc) · 1015 Bytes
/
OverlayInsertionTest.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// OverlayInsertionTest.swift
// OverlayContainer_Tests
//
// Created by Gaétan Zanella on 24/12/2018.
// Copyright © 2018 Gaétan Zanella. All rights reserved.
//
import Quick
import Nimble
import OverlayContainer
class OverlayInsertionTest: QuickSpec {
override func spec() {
let overlayContainer = OverlayContainerViewController()
overlayContainer.loadViewIfNeeded()
it("should insert overlay") {
let overlay1 = UIViewController()
overlayContainer.viewControllers = [overlay1]
expect(overlayContainer.children).to(equal([overlay1]))
}
it("should replace overlay") {
let overlay2 = UIViewController()
overlayContainer.viewControllers = [overlay2]
expect(overlayContainer.children).to(equal([overlay2]))
}
it("should remove overlay") {
overlayContainer.viewControllers = []
expect(overlayContainer.children).to(equal([]))
}
}
}