Ensures that when there is no authenticator for a realm, requests are not authenticated (i.e. the principal is None).
| 1860 | // Ensures that when there is no authenticator for a realm, |
| 1861 | // requests are not authenticated (i.e. the principal is None). |
| 1862 | TEST_F(HttpAuthenticationTest, NoAuthenticator) |
| 1863 | { |
| 1864 | Http http; |
| 1865 | |
| 1866 | EXPECT_CALL(*http.process, authenticated(_, Option<Principal>::none())) |
| 1867 | .WillOnce(Return(http::OK())); |
| 1868 | |
| 1869 | Future<http::Response> response = |
| 1870 | http::get(http.process->self(), "authenticated"); |
| 1871 | |
| 1872 | AWAIT_EXPECT_RESPONSE_STATUS_EQ(http::OK().status, response); |
| 1873 | } |
| 1874 | |
| 1875 | |
| 1876 | // Tests that an authentication Unauthorized result is exposed correctly. |
nothing calls this directly
no test coverage detected