mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-28 11:14:54 -04:00
remove tests for trivial model accessors
This commit is contained in:
parent
38be4ed5a9
commit
ecb372a2c8
3 changed files with 0 additions and 77 deletions
|
|
@ -13,26 +13,6 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestF3Model_ForgeAccessors(t *testing.T) {
|
||||
forge := NewForge()
|
||||
|
||||
url := "URL"
|
||||
forge.SetURL(url)
|
||||
assert.Equal(t, url, forge.GetURL())
|
||||
|
||||
id := int64(1324)
|
||||
forge.SetID(id)
|
||||
assert.Equal(t, id, forge.GetID())
|
||||
|
||||
token := "token"
|
||||
forge.SetToken(token)
|
||||
assert.Equal(t, token, forge.GetToken())
|
||||
|
||||
typ := "TYPE"
|
||||
forge.SetType(typ)
|
||||
assert.Equal(t, typ, forge.GetType())
|
||||
}
|
||||
|
||||
func TestF3Model_ForgeEncryption(t *testing.T) {
|
||||
forge := NewForge()
|
||||
forge.SetURL("")
|
||||
|
|
|
|||
|
|
@ -16,43 +16,6 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestF3Model_MirrorAccessors(t *testing.T) {
|
||||
mirror := NewMirror()
|
||||
|
||||
id := int64(1324)
|
||||
mirror.SetID(id)
|
||||
assert.Equal(t, id, mirror.GetID())
|
||||
|
||||
token := "TOKEN"
|
||||
mirror.SetToken(token)
|
||||
assert.Equal(t, token, mirror.GetToken())
|
||||
|
||||
forgeID := int64(888)
|
||||
mirror.SetForgeID(forgeID)
|
||||
assert.Equal(t, forgeID, mirror.GetForgeID())
|
||||
|
||||
fromPath := "/forge/users/user1"
|
||||
mirror.SetFromPath(fromPath)
|
||||
assert.Equal(t, fromPath, mirror.GetFromPath())
|
||||
|
||||
toPath := "/forge/users/user2"
|
||||
mirror.SetToPath(toPath)
|
||||
assert.Equal(t, toPath, mirror.GetToPath())
|
||||
|
||||
since := timeutil.TimeStampNow()
|
||||
mirror.SetSince(since)
|
||||
assert.Equal(t, since, mirror.GetSince())
|
||||
|
||||
interval, err := time.ParseDuration("24h")
|
||||
require.NoError(t, err)
|
||||
mirror.SetInterval(interval)
|
||||
assert.Equal(t, interval, mirror.GetInterval())
|
||||
|
||||
sendNotifications := true
|
||||
mirror.SetSendNotifications(sendNotifications)
|
||||
assert.Equal(t, sendNotifications, mirror.GetSendNotifications())
|
||||
}
|
||||
|
||||
func TestF3Model_MirrorEncryption(t *testing.T) {
|
||||
require.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
|
|
|
|||
|
|
@ -14,26 +14,6 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestF3Model_ResourceAccessors(t *testing.T) {
|
||||
resource := NewResource(0, 0, 0)
|
||||
|
||||
id := int64(1324)
|
||||
resource.SetID(id)
|
||||
assert.Equal(t, id, resource.GetID())
|
||||
|
||||
forgeID := int64(888)
|
||||
resource.SetForgeID(forgeID)
|
||||
assert.Equal(t, forgeID, resource.GetForgeID())
|
||||
|
||||
resourceID := int64(888)
|
||||
resource.SetResourceID(resourceID)
|
||||
assert.Equal(t, resourceID, resource.GetResourceID())
|
||||
|
||||
kind := KindOwner
|
||||
resource.SetKind(kind)
|
||||
assert.Equal(t, kind, resource.GetKind())
|
||||
}
|
||||
|
||||
func TestF3Model_ResourceDatabase(t *testing.T) {
|
||||
require.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue