summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-01-18 00:01:04 +0000
committertechknowlogick <hello@techknowlogick.com>2019-01-17 19:01:04 -0500
commit07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8 (patch)
tree87ced90635366b09e7e5f2634acfe2cbec2bc9f6 /integrations
parent9edc829c1758b436f8f52ebe61479af087940d60 (diff)
downloadgitea-07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8.tar.gz
gitea-07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8.zip
Refactor repo.isBare to repo.isEmpty #5629 (#5714)
* Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
Diffstat (limited to 'integrations')
-rw-r--r--integrations/empty_repo_test.go (renamed from integrations/bare_repo_test.go)8
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/bare_repo_test.go b/integrations/empty_repo_test.go
index e693c181dd..2d72546e7d 100644
--- a/integrations/bare_repo_test.go
+++ b/integrations/empty_repo_test.go
@@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/models"
)
-func TestBareRepo(t *testing.T) {
+func TestEmptyRepo(t *testing.T) {
prepareTestEnv(t)
subpaths := []string{
"commits/master",
@@ -19,10 +19,10 @@ func TestBareRepo(t *testing.T) {
"commit/1ae57b34ccf7e18373",
"graph",
}
- bareRepo := models.AssertExistsAndLoadBean(t, &models.Repository{}, models.Cond("is_bare = ?", true)).(*models.Repository)
- owner := models.AssertExistsAndLoadBean(t, &models.User{ID: bareRepo.OwnerID}).(*models.User)
+ emptyRepo := models.AssertExistsAndLoadBean(t, &models.Repository{}, models.Cond("is_empty = ?", true)).(*models.Repository)
+ owner := models.AssertExistsAndLoadBean(t, &models.User{ID: emptyRepo.OwnerID}).(*models.User)
for _, subpath := range subpaths {
- req := NewRequestf(t, "GET", "/%s/%s/%s", owner.Name, bareRepo.Name, subpath)
+ req := NewRequestf(t, "GET", "/%s/%s/%s", owner.Name, emptyRepo.Name, subpath)
MakeRequest(t, req, http.StatusNotFound)
}
}