File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Coder Desktop/Coder DesktopTests Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ struct LoginTests {
7373 @Test
7474 func testFailedAuthentication( ) async throws {
7575 let url = URL ( string: " https://testFailedAuthentication.com " ) !
76+ let buildInfo = BuildInfoResponse (
77+ version: " v2.20.0 "
78+ )
79+ try Mock (
80+ url: url. appendingPathComponent ( " /api/v2/buildinfo " ) ,
81+ statusCode: 200 ,
82+ data: [ . get: Client . encoder. encode ( buildInfo) ]
83+ ) . register ( )
7684 Mock ( url: url. appendingPathComponent ( " /api/v2/users/me " ) , statusCode: 401 , data: [ . get: Data ( ) ] ) . register ( )
7785
7886 try await ViewHosting . host ( view) {
@@ -95,13 +103,22 @@ struct LoginTests {
95103 id: UUID ( ) ,
96104 username: " admin "
97105 )
106+ let buildInfo = BuildInfoResponse (
107+ version: " v2.20.0 "
108+ )
98109
99110 try Mock (
100111 url: url. appendingPathComponent ( " /api/v2/users/me " ) ,
101112 statusCode: 200 ,
102113 data: [ . get: Client . encoder. encode ( user) ]
103114 ) . register ( )
104115
116+ try Mock (
117+ url: url. appendingPathComponent ( " /api/v2/buildinfo " ) ,
118+ statusCode: 200 ,
119+ data: [ . get: Client . encoder. encode ( buildInfo) ]
120+ ) . register ( )
121+
105122 try await ViewHosting . host ( view) {
106123 try await sut. inspection. inspect { view in
107124 try view. find ( ViewType . TextField. self) . setInput ( url. absoluteString)
You can’t perform that action at this time.
0 commit comments