Rename getFromProjectLookup to getRepoName
ProjectLookup is the implementation detail and it's not relevant to the
caller of the interface.
It's still valuable to have some information about the implementation so
updated the documentation and mentioned it's relationship to
setInProjectLookup
Google-Bug-Id: b/297849592
Release-Notes: skip
Change-Id: Ica48efc7e66a80ddd989a7223ba64e18c772af96
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts b/polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts
index 50e506b..fbc0338 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts
@@ -263,7 +263,7 @@
let urlPromise: MockPromise<string>;
setup(() => {
- stubRestApi('setInProjectLookup');
+ stubRestApi('addRepoNameToCache');
urlPromise = mockPromise<string>();
redirectStub = sinon
.stub(router, 'redirect')
@@ -374,7 +374,7 @@
}
setup(() => {
- stubRestApi('setInProjectLookup');
+ stubRestApi('addRepoNameToCache');
redirectStub = sinon.stub(router, 'redirect');
redirectToLoginStub = sinon.stub(router, 'redirectToLogin');
setStateStub = sinon.stub(router, 'setState');
@@ -863,7 +863,7 @@
test('CHANGE_LEGACY', async () => {
// CHANGE_LEGACY: /^\/c\/(\d+)\/?(.*)$/,
- stubRestApi('getFromProjectLookup').resolves('project' as RepoName);
+ stubRestApi('getRepoName').resolves('project' as RepoName);
await checkRedirect('/c/1234', '/c/project/+/1234/');
await checkRedirect(
'/c/1234/comment/6789',