git.fiddlerwoaroof.com
Browse code

Code improvement: renamed variables to reflect change from tokens ot keys as output

Roscoe Huo authored on 16/06/2017 17:39:29
Showing 1 changed files
... ...
@@ -25,7 +25,7 @@
25 25
 class mock_tokens : public tokens_ifc
26 26
 {
27 27
 public:
28
-    mutable std::string captured_token;
28
+    mutable std::string captured_key;
29 29
     const std::string key_;
30 30
 
31 31
     mock_tokens (std::string key)
... ...
@@ -43,9 +43,9 @@ public:
43 43
         return key_;
44 44
     }
45 45
 
46
-    void save (const user &user, const std::string &token) const override
46
+    void save (const user &user, const std::string &key) const override
47 47
     {
48
-        captured_token = token;
48
+        captured_key = key;
49 49
     }
50 50
 };
51 51
 
... ...
@@ -141,7 +141,7 @@ int installs_token()
141 141
     std::tie (actual_key, actual_token) = installer.install_key();
142 142
 
143 143
     //then
144
-    check (test_tokens->captured_token == key, "installed wrong key");
144
+    check (test_tokens->captured_key == key, "installed wrong key");
145 145
     check (actual_key == key, "installer returned wrong key");
146 146
     check (actual_token == token, "installer returned wrong token");
147 147
     succeed();
... ...
@@ -193,7 +193,7 @@ int directory_finds_no_user_info()
193 193
     std::tie (actual_key, actual_token) = installer.install_key();
194 194
 
195 195
     //then
196
-    check (test_tokens->captured_token == "", "installed wrong key");
196
+    check (test_tokens->captured_key == "", "installed wrong key");
197 197
     check (actual_key == "", "did not return empty token");
198 198
     check (actual_token == "", "did not return an empty token");
199 199
     succeed();