Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py |
index b30bccdc2b94ba347b02f5a4c73edc71059fdd24..f2ddfb52f6570ceafcee20171138e05fe4f26205 100644 |
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py |
@@ -20,12 +20,21 @@ class GitCLTest(unittest.TestCase): |
self.assertEqual(output, 'mock-output') |
self.assertEqual(host.executive.calls, [['git', 'cl', 'command']]) |
- def test_run_basic(self): |
+ def test_run_with_auth(self): |
host = MockHost() |
host.executive = MockExecutive(output='mock-output') |
- git_cl = GitCL(host) |
- git_cl.run(['upload']) |
- self.assertEqual(host.executive.calls, [['git', 'cl', 'upload']]) |
+ git_cl = GitCL(host, auth_refresh_token_json='token.json') |
+ git_cl.run(['try', '-b', 'win10_blink_rel']) |
+ self.assertEqual( |
+ host.executive.calls, |
+ [['git', 'cl', 'try', '-b', 'win10_blink_rel', '--auth-refresh-token-json', 'token.json']]) |
+ |
+ def test_some_commands_not_run_with_auth(self): |
+ host = MockHost() |
+ host.executive = MockExecutive(output='mock-output') |
+ git_cl = GitCL(host, auth_refresh_token_json='token.json') |
+ git_cl.run(['issue']) |
+ self.assertEqual(host.executive.calls, [['git', 'cl', 'issue']]) |
def test_get_issue_number(self): |
host = MockHost() |