git.fiddlerwoaroof.com
Browse code

CJPM-5223: Remove commented test

Ed Langley authored on 14/06/2017 19:13:40
Showing 2 changed files
... ...
@@ -47,7 +47,6 @@ public:
47 47
         user user (found_user[0]);
48 48
 
49 49
         std::string key_string = tokens_.ensure_key (user);
50
-        // TODO: use vectors in generator input instead of strings to avoid this nonsense
51 50
         std::vector<uint8_t> key = base32().decode (key_string);
52 51
         std::string token = generator_.generate_token (key);
53 52
 
... ...
@@ -21,7 +21,6 @@
21 21
 #include "test_util.h"
22 22
 #include "generator.h"
23 23
 
24
-// TODO: audit usage of 'token', sometimes it should be 'key'
25 24
 class mock_tokens : public tokens_ifc
26 25
 {
27 26
 public:
... ...
@@ -147,30 +146,6 @@ int installs_token()
147 146
     succeed();
148 147
 }
149 148
 
150
-// int unistd_does_not_find_user_name_nullptr_case()
151
-// {
152
-//     //given
153
-//     std::string user_name ("user");
154
-//     std::string key ("token");
155
-//     auto  test_tokens = std::make_shared<mock_tokens>(key);
156
-//     tokens tokens{test_tokens};
157
-//     unistd unistd (std::make_shared<fail_unistd>());
158
-//     directory directory (std::make_shared<fake_directory> (user_name));
159
-//     totp_generator generator (std::make_shared<fake_totp_generator>());
160
-
161
-//     installer installer = installer::create (tokens, unistd, directory,
162
-//                           generator);
163
-
164
-//     //when
165
-//     auto returned = installer.install_key();
166
-
167
-//     //then
168
-//     check (test_tokens->captured_token == "",
169
-//            "should not have installed a token");
170
-//     check (returned == "", "did not return empty token");
171
-//     succeed();
172
-// }
173
-
174 149
 int unistd_does_not_find_user_name_empty_string_case()
175 150
 {
176 151
     //given
... ...
@@ -226,7 +201,6 @@ int directory_finds_no_user_info()
226 201
 int run_tests()
227 202
 {
228 203
     test (installs_token);
229
-    // test (unistd_does_not_find_user_name_nullptr_case);
230 204
     test (unistd_does_not_find_user_name_empty_string_case);
231 205
     test (directory_finds_no_user_info);
232 206
     succeed();