commit
3a9337686e
2 changed files with 9 additions and 1 deletions
|
@ -110,7 +110,7 @@ class RepositoryList(ApiResource):
|
||||||
# If starred (and only starred) repositories were requested, then load them directly.
|
# If starred (and only starred) repositories were requested, then load them directly.
|
||||||
if starred and namespace is None and not public:
|
if starred and namespace is None and not public:
|
||||||
if not username:
|
if not username:
|
||||||
return []
|
return [], set()
|
||||||
|
|
||||||
repositories = model.repository.get_user_starred_repositories(get_authenticated_user(),
|
repositories = model.repository.get_user_starred_repositories(get_authenticated_user(),
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
|
@ -1366,6 +1366,14 @@ class TestListRepos(ApiTestCase):
|
||||||
for repo in json['repositories']:
|
for repo in json['repositories']:
|
||||||
self.assertEquals(ORGANIZATION, repo['namespace'])
|
self.assertEquals(ORGANIZATION, repo['namespace'])
|
||||||
|
|
||||||
|
def test_listrepos_starred_nouser(self):
|
||||||
|
json = self.getJsonResponse(RepositoryList,
|
||||||
|
params=dict(last_modified=True,
|
||||||
|
popularity=True,
|
||||||
|
starred=True))
|
||||||
|
|
||||||
|
self.assertEquals(len(json['repositories']), 0)
|
||||||
|
|
||||||
def test_listrepos_starred(self):
|
def test_listrepos_starred(self):
|
||||||
self.login(ADMIN_ACCESS_USER)
|
self.login(ADMIN_ACCESS_USER)
|
||||||
|
|
||||||
|
|
Reference in a new issue