diff options
Diffstat (limited to 'models/repo_test.go')
-rw-r--r-- | models/repo_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/repo_test.go b/models/repo_test.go index 7c0e94a5ae..a538d44c0e 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -125,3 +125,10 @@ func TestForkRepository(t *testing.T) { assert.Error(t, err) assert.True(t, IsErrRepoAlreadyExist(err)) } + +func TestRepoAPIURL(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + repo := AssertExistsAndLoadBean(t, &Repository{ID: 10}).(*Repository) + + assert.Equal(t, "https://try.gitea.io/api/v1/repos/user12/repo10", repo.APIURL()) +} |