chore: remove unit tests
This commit is contained in:
parent
e8e4cfc1e0
commit
0d361c8863
2 changed files with 4 additions and 60 deletions
|
|
@ -1,11 +1,9 @@
|
||||||
package template
|
package template
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
|
|
||||||
"github.com/go-jet/jet/v2/generator/metadata"
|
"github.com/go-jet/jet/v2/generator/metadata"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_TableModelField(t *testing.T) {
|
func Test_TableModelField(t *testing.T) {
|
||||||
|
|
@ -45,29 +43,3 @@ func Test_TableModelField(t *testing.T) {
|
||||||
Tags: nil,
|
Tags: nil,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_Model_ShouldSkip(t *testing.T) {
|
|
||||||
tests := []struct {
|
|
||||||
name string
|
|
||||||
initial Model
|
|
||||||
skip bool
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "True",
|
|
||||||
initial: Model{Skip: false},
|
|
||||||
skip: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "False",
|
|
||||||
initial: Model{Skip: true},
|
|
||||||
skip: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
updatedModel := tt.initial.ShouldSkip(tt.skip)
|
|
||||||
require.Equal(t, tt.skip, updatedModel.Skip)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
package template
|
package template
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
|
|
||||||
"github.com/go-jet/jet/v2/generator/metadata"
|
"github.com/go-jet/jet/v2/generator/metadata"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestToGoEnumValueIdentifier(t *testing.T) {
|
func TestToGoEnumValueIdentifier(t *testing.T) {
|
||||||
|
|
@ -37,29 +35,3 @@ func TestColumnRenameReserved(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_SQLBuilder_ShouldSkip(t *testing.T) {
|
|
||||||
tests := []struct {
|
|
||||||
name string
|
|
||||||
initial SQLBuilder
|
|
||||||
skip bool
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "True",
|
|
||||||
initial: SQLBuilder{Skip: false},
|
|
||||||
skip: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "False",
|
|
||||||
initial: SQLBuilder{Skip: true},
|
|
||||||
skip: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
updatedBuilder := tt.initial.ShouldSkip(tt.skip)
|
|
||||||
require.Equal(t, tt.skip, updatedBuilder.Skip)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue