mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
✅ Ensure normal nginx file does not have proxy
This commit is contained in:
@ -34,9 +34,13 @@ class NginxConfigParserTest: XCTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testCanDetermineProxy() throws {
|
func testCanDetermineProxy() throws {
|
||||||
let parsed = NginxConfigParser(filePath: NginxConfigParserTest.proxyUrl.path)
|
let proxied = NginxConfigParser(filePath: NginxConfigParserTest.proxyUrl.path)
|
||||||
XCTAssertTrue(parsed.contents.contains("# valet stub: proxy.valet.conf"))
|
XCTAssertTrue(proxied.contents.contains("# valet stub: proxy.valet.conf"))
|
||||||
XCTAssertEqual("http://127.0.0.1:90", parsed.proxy)
|
XCTAssertEqual("http://127.0.0.1:90", proxied.proxy)
|
||||||
|
|
||||||
|
let normal = NginxConfigParser(filePath: NginxConfigParserTest.regularUrl.path)
|
||||||
|
XCTAssertFalse(normal.contents.contains("# valet stub: proxy.valet.conf"))
|
||||||
|
XCTAssertEqual(nil, normal.proxy)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user